awguard 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/Dockerfile +8 -0
- package/README.md +75 -1
- package/action.yml +2 -2
- package/docs/assets/terminal-demo.svg +19 -0
- package/docs/comparison.md +23 -0
- package/docs/launch-plan.md +28 -13
- package/docs/market-analysis.md +20 -0
- package/docs/marketplace-listing.md +40 -0
- package/docs/roadmap.md +75 -0
- package/docs/site/index.html +251 -0
- package/examples/.gitlab-ci.yml +6 -0
- package/examples/.vscode/tasks.json +17 -0
- package/examples/README.md +5 -0
- package/examples/awguard.config.example.json +6 -0
- package/examples/lab/README.md +27 -0
- package/examples/lab/fixed/.github/workflows/ai-triage.yml +20 -0
- package/examples/lab/fixed/.mcp.json +12 -0
- package/examples/lab/fixed/AGENTS.md +5 -0
- package/examples/lab/unsafe/.github/workflows/ai-triage.yml +16 -0
- package/examples/lab/unsafe/.mcp.json +11 -0
- package/examples/lab/unsafe/AGENTS.md +4 -0
- package/examples/pre-commit-config.yaml +8 -0
- package/package.json +2 -1
- package/src/cli.js +63 -3
- package/src/compare.js +110 -0
- package/src/config.js +29 -2
- package/src/graph.js +6 -1
- package/src/init.js +81 -0
- package/src/inventory.js +159 -0
- package/src/migration.js +10 -0
- package/src/presets.js +2 -1
- package/src/remediation.js +19 -0
- package/src/reporters.js +10 -1
- package/src/scanner.js +119 -5
- package/src/score.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.0
|
|
4
|
+
|
|
5
|
+
- Add `awguard init` to print starter GitHub Action, strict config, baseline, report, and badge setup snippets.
|
|
6
|
+
- Add `--format inventory-json` for machine-readable agentic surface inventories.
|
|
7
|
+
- Add `--compare previous.json current.json` for introduced/resolved finding and file drift reports.
|
|
8
|
+
- Add policy allowlists with `AWG015` for unapproved files, MCP servers, packages, or commands.
|
|
9
|
+
- Add Docker, GitLab CI, pre-commit, VS Code task, Marketplace, comparison, demo, and vulnerable lab assets.
|
|
10
|
+
|
|
11
|
+
## 1.5.0
|
|
12
|
+
|
|
13
|
+
- Add `--format inventory` to map agentic repository surfaces by workflows, agent context files, and MCP configs.
|
|
14
|
+
- Scan GitHub Copilot custom agents, reusable prompts, and repository skills under `.github/agents`, `.github/prompts`, and `.github/skills`.
|
|
15
|
+
- Add a scope expansion roadmap for policy mode, agent capability SBOMs, trend reports, and adoption tooling.
|
|
16
|
+
|
|
3
17
|
## 1.4.0
|
|
4
18
|
|
|
5
19
|
- Add `AWG013` for project MCP configs that start mutable packages, unpinned containers, or shell wrappers.
|
package/Dockerfile
ADDED
package/README.md
CHANGED
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
[](https://github.com/Mughal-Baig/agentic-workflow-guard/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/awguard)
|
|
7
7
|
[](docs/awguard-badge.json)
|
|
8
|
+
[](https://mughal-baig.github.io/agentic-workflow-guard/)
|
|
8
9
|
[](LICENSE)
|
|
9
10
|
|
|
11
|
+

|
|
12
|
+
|
|
10
13
|
`agentic-workflow-guard` is a small, zero-dependency scanner for GitHub Actions workflows, persistent agent instruction files, and MCP configs used by AI coding agents, LLMs, or automated review bots.
|
|
11
14
|
|
|
12
15
|
It looks for a new class of CI/CD risk: untrusted issue, pull request, comment, or branch text flowing into an AI agent prompt, then into write-capable tools, secrets, shell scripts, persistent instructions that weaken review boundaries, or MCP servers that expand agent authority.
|
|
@@ -42,6 +45,12 @@ Install from npm:
|
|
|
42
45
|
npx awguard .
|
|
43
46
|
```
|
|
44
47
|
|
|
48
|
+
Generate a starter config, GitHub Action, baseline command, and badge snippet:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx awguard init
|
|
52
|
+
```
|
|
53
|
+
|
|
45
54
|
## Use In GitHub Actions
|
|
46
55
|
|
|
47
56
|
After you upload this repository to GitHub, users can add:
|
|
@@ -113,7 +122,9 @@ jobs:
|
|
|
113
122
|
## CLI
|
|
114
123
|
|
|
115
124
|
```bash
|
|
116
|
-
awguard [path] [--config file] [--preset name] [--format text|json|markdown|github|sarif|graph|html|migration|score|badge] [--output file] [--baseline file] [--write-baseline file] [--fix-dry-run] [--fail-on none|low|medium|high|critical]
|
|
125
|
+
awguard [path] [--config file] [--preset name] [--format text|json|markdown|github|sarif|graph|html|migration|score|badge|inventory|inventory-json] [--output file] [--baseline file] [--write-baseline file] [--fix-dry-run] [--fail-on none|low|medium|high|critical]
|
|
126
|
+
awguard init
|
|
127
|
+
awguard --compare previous.json current.json
|
|
117
128
|
```
|
|
118
129
|
|
|
119
130
|
Examples:
|
|
@@ -124,6 +135,8 @@ node ./bin/awguard.js . --config awguard.config.json
|
|
|
124
135
|
node ./bin/awguard.js . --preset strict --format graph
|
|
125
136
|
node ./bin/awguard.js . --format html --output awguard-report.html
|
|
126
137
|
node ./bin/awguard.js . --format migration --output awguard-migration.md
|
|
138
|
+
node ./bin/awguard.js . --format inventory
|
|
139
|
+
node ./bin/awguard.js . --format inventory-json --output awguard-inventory.json
|
|
127
140
|
node ./bin/awguard.js . --format score
|
|
128
141
|
node ./bin/awguard.js . --format badge --output awguard-badge.json
|
|
129
142
|
node ./bin/awguard.js . --fix-dry-run
|
|
@@ -131,6 +144,7 @@ node ./bin/awguard.js . --format markdown --fail-on medium
|
|
|
131
144
|
node ./bin/awguard.js . --format sarif --output awguard.sarif --fail-on none
|
|
132
145
|
node ./bin/awguard.js . --write-baseline awguard.baseline.json
|
|
133
146
|
node ./bin/awguard.js . --baseline awguard.baseline.json --fail-on high
|
|
147
|
+
node ./bin/awguard.js --compare old-awguard.json new-awguard.json
|
|
134
148
|
node ./bin/awguard.js . --format github --fail-on high
|
|
135
149
|
```
|
|
136
150
|
|
|
@@ -241,6 +255,50 @@ Then add a badge to your README:
|
|
|
241
255
|
|
|
242
256
|
The score starts at 100 and subtracts risk for critical, high, medium, and low findings. This makes AWGuard easy to show in a README without hiding the detailed SARIF, graph, and migration reports.
|
|
243
257
|
|
|
258
|
+
## Agentic Surface Inventory
|
|
259
|
+
|
|
260
|
+
Generate a repository map of agent-related surfaces:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
node ./bin/awguard.js . --format inventory
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
The inventory groups scanned files into GitHub Actions workflows, persistent agent context files, and MCP configs. It shows which surfaces exist, which rules fired, and what to review next. This is useful before a team enables new coding agents because it answers: "Where can agents read instructions, get tools, or act in CI?"
|
|
267
|
+
|
|
268
|
+
For dashboards, use JSON:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
node ./bin/awguard.js . --format inventory-json --output awguard-inventory.json
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Compare Reports
|
|
275
|
+
|
|
276
|
+
Track newly introduced agentic risk across branches or releases:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
node ./bin/awguard.js . --format json --output current-awguard.json
|
|
280
|
+
node ./bin/awguard.js --compare previous-awguard.json current-awguard.json
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
The comparison report shows introduced findings, resolved findings, added scanned files, and removed scanned files.
|
|
284
|
+
|
|
285
|
+
## Policy Mode
|
|
286
|
+
|
|
287
|
+
Policy mode makes new agent surfaces visible during review. Add allowlists to `awguard.config.json`:
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"policy": {
|
|
292
|
+
"approvedFiles": ["AGENTS.md", ".github/workflows/*"],
|
|
293
|
+
"approvedMcpServers": ["github"],
|
|
294
|
+
"approvedMcpPackages": ["@modelcontextprotocol/server-github@1.2.3"],
|
|
295
|
+
"approvedMcpCommands": ["npx", "node"]
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Anything outside the policy is reported as `AWG015`.
|
|
301
|
+
|
|
244
302
|
## Agent Context Guard
|
|
245
303
|
|
|
246
304
|
AWGuard also scans persistent agent instruction files:
|
|
@@ -251,6 +309,9 @@ AWGuard also scans persistent agent instruction files:
|
|
|
251
309
|
- `GEMINI.md`
|
|
252
310
|
- `.github/copilot-instructions.md`
|
|
253
311
|
- `.github/instructions/*.instructions.md`
|
|
312
|
+
- `.github/agents/*.md`
|
|
313
|
+
- `.github/prompts/*.prompt.md`
|
|
314
|
+
- `.github/skills/**/SKILL.md`
|
|
254
315
|
- `.cursor/rules/*.{md,mdc,txt}`
|
|
255
316
|
- `.cursorrules`, `.windsurfrules`, and `.clinerules`
|
|
256
317
|
|
|
@@ -313,6 +374,11 @@ If you omit rule ids, the suppression applies to all findings on the target line
|
|
|
313
374
|
| AWG012 | High/Critical | Agent instruction files that weaken approval, permission, or secret boundaries |
|
|
314
375
|
| AWG013 | High | MCP configs that start mutable packages, unpinned containers, or shell wrappers |
|
|
315
376
|
| AWG014 | Critical | MCP configs that hardcode secrets, tokens, passwords, or auth headers |
|
|
377
|
+
| AWG015 | Medium | Agentic surfaces, MCP servers, packages, or commands not approved by policy |
|
|
378
|
+
|
|
379
|
+
## How It Compares
|
|
380
|
+
|
|
381
|
+
See [docs/comparison.md](docs/comparison.md) for how AWGuard fits beside `zizmor`, `actionlint`, OpenSSF Scorecard, secret scanners, and MCP runtime scanners.
|
|
316
382
|
|
|
317
383
|
## Example Finding
|
|
318
384
|
|
|
@@ -330,10 +396,18 @@ If you omit rule ids, the suppression applies to all findings on the target line
|
|
|
330
396
|
- Hosted AWI score API for dynamic cross-repository badges.
|
|
331
397
|
- Agent instruction file rule packs for Copilot, Claude Code, Codex, Gemini, Cursor, and Windsurf.
|
|
332
398
|
- MCP config rule packs for Claude Code, Copilot, VS Code, Cursor, Windsurf, Cline, and Roo.
|
|
399
|
+
- Policy mode for approved MCP packages, actions, token scopes, and agent context files.
|
|
400
|
+
- Agent capability SBOM for prompts, tools, MCP servers, permissions, and write paths.
|
|
401
|
+
- Trend reports that show newly added agent surfaces and newly introduced findings.
|
|
333
402
|
- GitHub App integration for always-on repository monitoring.
|
|
334
403
|
- Rule packs for Claude Code, Codex, Gemini, Copilot, Aider, and custom agents.
|
|
335
404
|
- Public vulnerable workflow lab with attack and fix walkthroughs.
|
|
336
405
|
|
|
406
|
+
## Contributing And Security
|
|
407
|
+
|
|
408
|
+
Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md), and report sensitive security issues using [SECURITY.md](SECURITY.md).
|
|
409
|
+
|
|
337
410
|
## Research Backing
|
|
338
411
|
|
|
339
412
|
See [docs/market-analysis.md](docs/market-analysis.md) for the demand analysis, gap, audience, and launch plan.
|
|
413
|
+
See [docs/roadmap.md](docs/roadmap.md) for the scope expansion roadmap.
|
package/action.yml
CHANGED
|
@@ -7,7 +7,7 @@ inputs:
|
|
|
7
7
|
required: false
|
|
8
8
|
default: .
|
|
9
9
|
format:
|
|
10
|
-
description: Output format: github, text, json, markdown, sarif, graph, html, migration, score, or
|
|
10
|
+
description: Output format: github, text, json, markdown, sarif, graph, html, migration, score, badge, inventory, or inventory-json.
|
|
11
11
|
required: false
|
|
12
12
|
default: github
|
|
13
13
|
fail-on:
|
|
@@ -15,7 +15,7 @@ inputs:
|
|
|
15
15
|
required: false
|
|
16
16
|
default: high
|
|
17
17
|
output:
|
|
18
|
-
description: Optional file path for json, markdown, sarif, graph, html, migration, score, or
|
|
18
|
+
description: Optional file path for json, markdown, sarif, graph, html, migration, score, badge, inventory, or inventory-json output.
|
|
19
19
|
required: false
|
|
20
20
|
default: ''
|
|
21
21
|
baseline:
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="920" height="430" viewBox="0 0 920 430" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">Agentic Workflow Guard terminal demo</title>
|
|
3
|
+
<desc id="desc">A terminal-style screenshot showing AWGuard inventory and MCP findings.</desc>
|
|
4
|
+
<rect width="920" height="430" rx="10" fill="#101820"/>
|
|
5
|
+
<rect x="0" y="0" width="920" height="42" rx="10" fill="#17242f"/>
|
|
6
|
+
<circle cx="24" cy="21" r="6" fill="#ff5f57"/>
|
|
7
|
+
<circle cx="44" cy="21" r="6" fill="#ffbd2e"/>
|
|
8
|
+
<circle cx="64" cy="21" r="6" fill="#28c840"/>
|
|
9
|
+
<text x="88" y="27" fill="#d8e6ee" font-family="Menlo, Consolas, monospace" font-size="14">awguard demo</text>
|
|
10
|
+
<text x="28" y="78" fill="#7dd3fc" font-family="Menlo, Consolas, monospace" font-size="16">$ npx awguard . --format inventory</text>
|
|
11
|
+
<text x="28" y="118" fill="#e7f4f2" font-family="Menlo, Consolas, monospace" font-size="16">Agentic Surface Inventory</text>
|
|
12
|
+
<text x="28" y="154" fill="#a7f3d0" font-family="Menlo, Consolas, monospace" font-size="14">✓ GitHub Actions workflows: 2 files, 0 findings</text>
|
|
13
|
+
<text x="28" y="184" fill="#fde68a" font-family="Menlo, Consolas, monospace" font-size="14">! Agent context files: 1 file, AWG012</text>
|
|
14
|
+
<text x="28" y="214" fill="#fca5a5" font-family="Menlo, Consolas, monospace" font-size="14">! MCP configs: 1 file, AWG013, AWG014</text>
|
|
15
|
+
<text x="28" y="260" fill="#7dd3fc" font-family="Menlo, Consolas, monospace" font-size="16">$ npx awguard examples/.mcp.json --fix-dry-run</text>
|
|
16
|
+
<text x="28" y="300" fill="#fca5a5" font-family="Menlo, Consolas, monospace" font-size="14">CRITICAL AWG014 MCP config hardcodes secrets or auth material</text>
|
|
17
|
+
<text x="28" y="330" fill="#fdba74" font-family="Menlo, Consolas, monospace" font-size="14">HIGH AWG013 MCP config starts mutable tool servers</text>
|
|
18
|
+
<text x="28" y="372" fill="#d8e6ee" font-family="Menlo, Consolas, monospace" font-size="14">Fix: pin tool packages, move credentials to prompts/env, and review policy drift.</text>
|
|
19
|
+
</svg>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Comparison
|
|
2
|
+
|
|
3
|
+
AWGuard is intentionally narrow. It should sit beside general CI/CD and AI security tools, not replace them.
|
|
4
|
+
|
|
5
|
+
| Tool | Main job | Where AWGuard differs |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `zizmor` | General GitHub Actions security analysis | AWGuard focuses on AI-agent prompt, tool, MCP, and repository instruction paths. |
|
|
8
|
+
| `actionlint` | GitHub Actions syntax and workflow linting | AWGuard looks for agentic trust-boundary risk, not YAML correctness. |
|
|
9
|
+
| OpenSSF Scorecard | Open-source project security posture | AWGuard gives an Agentic Workflow Injection score and agent surface inventory. |
|
|
10
|
+
| MCP runtime scanners | Inspect live MCP servers and tool descriptions | AWGuard scans repository MCP configs without executing server commands. |
|
|
11
|
+
| Secret scanners | Find committed secrets | AWGuard connects MCP/agent secret exposure to agent capabilities and remediation. |
|
|
12
|
+
|
|
13
|
+
## Best Stack
|
|
14
|
+
|
|
15
|
+
Use these together:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
actionlint -> workflow correctness
|
|
19
|
+
zizmor -> broad GitHub Actions hardening
|
|
20
|
+
OpenSSF Scorecard -> project posture
|
|
21
|
+
secret scanning -> committed credentials
|
|
22
|
+
AWGuard -> agentic workflow, context, and MCP trust boundaries
|
|
23
|
+
```
|
package/docs/launch-plan.md
CHANGED
|
@@ -10,49 +10,64 @@ Short pitch:
|
|
|
10
10
|
|
|
11
11
|
## Star-Worthy Demo
|
|
12
12
|
|
|
13
|
-
1. Show `
|
|
14
|
-
2.
|
|
13
|
+
1. Show the terminal demo image in `docs/assets/terminal-demo.svg`.
|
|
14
|
+
2. Show `examples/unsafe-agent.yml`.
|
|
15
|
+
3. Run:
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
18
|
node ./bin/awguard.js examples/unsafe-agent.yml --format graph
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
4. Show the generated Mermaid chain.
|
|
22
|
+
5. Run:
|
|
22
23
|
|
|
23
24
|
```bash
|
|
24
25
|
node ./bin/awguard.js examples/unsafe-agent.yml --fix-dry-run
|
|
25
26
|
```
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
6. Show the safe remediation steps.
|
|
29
|
+
7. Run:
|
|
29
30
|
|
|
30
31
|
```bash
|
|
31
32
|
node ./bin/awguard.js examples/unsafe-agent.yml --format migration
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
8. Show the migration from unsafe agent job to read-only proposal job plus safe outputs or an approved apply job.
|
|
36
|
+
9. Run:
|
|
36
37
|
|
|
37
38
|
```bash
|
|
38
39
|
node ./bin/awguard.js . --format score
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
10. Show the README badge and say: "Add an AWI risk badge to your repo before adding AI agents to CI."
|
|
43
|
+
11. Run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
node ./bin/awguard.js . --format inventory
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
12. Show the surface map and say: "Before you secure agent workflows, find every place the repository gives agents instructions or tools."
|
|
50
|
+
13. Run:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
node ./bin/awguard.js init
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
14. Show the one-command setup guide.
|
|
57
|
+
15. Show an unsafe `AGENTS.md` or `.github/copilot-instructions.md` line and run:
|
|
43
58
|
|
|
44
59
|
```bash
|
|
45
60
|
node ./bin/awguard.js . --format text
|
|
46
61
|
```
|
|
47
62
|
|
|
48
|
-
|
|
49
|
-
|
|
63
|
+
16. Explain that AWGuard scans both the workflow and the persistent agent instructions that shape agent behavior.
|
|
64
|
+
17. Show an unsafe `.mcp.json` with `npx @modelcontextprotocol/server-github` and a committed token, then run:
|
|
50
65
|
|
|
51
66
|
```bash
|
|
52
67
|
node ./bin/awguard.js examples/.mcp.json --format text
|
|
53
68
|
```
|
|
54
69
|
|
|
55
|
-
|
|
70
|
+
18. Explain the new hook: "This scanner checks repo-provided MCP tool wiring without executing the MCP server."
|
|
56
71
|
|
|
57
72
|
## Release Checklist
|
|
58
73
|
|
package/docs/market-analysis.md
CHANGED
|
@@ -197,6 +197,26 @@ Agentic Workflow Guard now supports:
|
|
|
197
197
|
|
|
198
198
|
This keeps the project focused: AWGuard does not try to replace MCP runtime scanners. It gives maintainers a GitHub-native, zero-dependency first check before an agent or scanner executes repo-provided MCP server commands.
|
|
199
199
|
|
|
200
|
+
## Deep Research Refresh: Agentic Surface Inventory
|
|
201
|
+
|
|
202
|
+
The next scope expansion is an inventory view. GitHub now documents repository-level custom agents in `.github/agents`, Copilot MCP configuration, and custom instructions. VS Code documents workspace MCP config. This means the repository itself can contain multiple agent-control surfaces before a single workflow runs.
|
|
203
|
+
|
|
204
|
+
The useful maintainer question is no longer only "is this workflow unsafe?" It is:
|
|
205
|
+
|
|
206
|
+
```text
|
|
207
|
+
what agent surfaces does this repository expose, and which ones changed?
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Agentic Workflow Guard now supports:
|
|
211
|
+
|
|
212
|
+
- `--format inventory` for a surface map grouped by workflows, agent context files, and MCP configs.
|
|
213
|
+
- scanning `.github/agents/*.md`, `.github/prompts/*.prompt.md`, and `.github/skills/**/SKILL.md` as persistent agent context.
|
|
214
|
+
- `awguard init` for adoption snippets, `--format inventory-json` for dashboards, and `--compare` for trend reports.
|
|
215
|
+
- first policy allowlists for approved files, MCP servers, MCP packages, and MCP commands.
|
|
216
|
+
- a roadmap that moves toward agent capability SBOMs, richer policy ownership, and hosted monitoring.
|
|
217
|
+
|
|
218
|
+
This widens the project while preserving its niche: AWGuard remains a zero-execution repository scanner for agentic risk, not a broad runtime agent firewall.
|
|
219
|
+
|
|
200
220
|
## Distribution Plan
|
|
201
221
|
|
|
202
222
|
1. Publish the repo with a short demo GIF or screenshot.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# GitHub Marketplace Listing Draft
|
|
2
|
+
|
|
3
|
+
## Name
|
|
4
|
+
|
|
5
|
+
Agentic Workflow Guard
|
|
6
|
+
|
|
7
|
+
## Short Description
|
|
8
|
+
|
|
9
|
+
Scan GitHub Actions, agent instruction files, and MCP configs for AI-agent injection risk.
|
|
10
|
+
|
|
11
|
+
## Categories
|
|
12
|
+
|
|
13
|
+
- Security
|
|
14
|
+
- Code quality
|
|
15
|
+
- Utilities
|
|
16
|
+
|
|
17
|
+
## Full Description
|
|
18
|
+
|
|
19
|
+
Agentic Workflow Guard finds where untrusted GitHub issue, pull request, comment, branch, or artifact text can steer AI agents inside CI.
|
|
20
|
+
|
|
21
|
+
It scans:
|
|
22
|
+
|
|
23
|
+
- GitHub Actions workflows;
|
|
24
|
+
- persistent agent instruction files such as `AGENTS.md`, Copilot instructions, custom agents, prompts, and skills;
|
|
25
|
+
- MCP configs such as `.mcp.json`, `.vscode/mcp.json`, Cursor, Windsurf, Cline, and Roo config files.
|
|
26
|
+
|
|
27
|
+
Outputs include GitHub annotations, SARIF for code scanning, attack graphs, migration plans, AWI scorecards, badges, and agentic surface inventory reports.
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
- uses: Mughal-Baig/agentic-workflow-guard@v0
|
|
33
|
+
with:
|
|
34
|
+
preset: strict
|
|
35
|
+
fail-on: high
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Suggested Release Note
|
|
39
|
+
|
|
40
|
+
Use this Action before adding AI agents, custom prompts, or MCP tools to a repository.
|
package/docs/roadmap.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Scope Expansion Roadmap
|
|
2
|
+
|
|
3
|
+
## Research Signal
|
|
4
|
+
|
|
5
|
+
AWGuard should widen from "workflow scanner" into an agentic repository safety map while staying small and zero-dependency.
|
|
6
|
+
|
|
7
|
+
Current research points:
|
|
8
|
+
|
|
9
|
+
- GitHub Copilot now documents repository-level custom agents in `.github/agents`, repository MCP configuration, and repo-scoped agent behavior.
|
|
10
|
+
- VS Code and Copilot document MCP configuration in repository or workspace files such as `.vscode/mcp.json`.
|
|
11
|
+
- GitHub Actions security docs still warn that attacker-controlled GitHub context must be treated as untrusted input.
|
|
12
|
+
- OpenSSF Scorecard shows that security tools travel further when they produce a simple public score, badge, and clear adoption path.
|
|
13
|
+
- Existing MCP scanners focus on live server/tool inspection; AWGuard's lane is zero-execution repository scanning before those tools start.
|
|
14
|
+
|
|
15
|
+
## Feature List
|
|
16
|
+
|
|
17
|
+
1. Agentic Surface Inventory
|
|
18
|
+
- Add `--format inventory`.
|
|
19
|
+
- Group scanned files into GitHub Actions workflows, agent context files, and MCP configs.
|
|
20
|
+
- Show findings, highest severity, and recommended next steps per surface.
|
|
21
|
+
|
|
22
|
+
2. Wider Agent Context Coverage
|
|
23
|
+
- Scan `.github/agents/*.md` for Copilot custom agents.
|
|
24
|
+
- Scan `.github/prompts/*.prompt.md` for reusable prompts.
|
|
25
|
+
- Scan `.github/skills/**/SKILL.md` for repository skills.
|
|
26
|
+
- Keep using `AWG012` for risky persistent instructions.
|
|
27
|
+
|
|
28
|
+
3. Policy Mode
|
|
29
|
+
- Add an `awguard.policy.json` format for explicit allowlists.
|
|
30
|
+
- Allow approved MCP commands, package pins, Docker digests, action owners, and workflow write scopes.
|
|
31
|
+
- Report drift when the repository adds a new agent surface without policy.
|
|
32
|
+
|
|
33
|
+
4. Setup And Adoption Generator
|
|
34
|
+
- Add a command that prints a starter GitHub Action, strict config, baseline command, and badge snippet.
|
|
35
|
+
- Keep it as a print-only generator first so it remains safe.
|
|
36
|
+
|
|
37
|
+
5. Agent Capability SBOM
|
|
38
|
+
- Export a machine-readable inventory of agent prompts, tools, MCP servers, permissions, secrets exposure, and write capabilities.
|
|
39
|
+
- Make it useful for security reviews and audits.
|
|
40
|
+
|
|
41
|
+
6. Trend Reports
|
|
42
|
+
- Compare current scan output with a previous JSON report.
|
|
43
|
+
- Show newly added agent surfaces and newly introduced rules.
|
|
44
|
+
|
|
45
|
+
7. Vulnerable Lab
|
|
46
|
+
- Add a set of intentionally unsafe mini-repositories under examples or a separate demo repo.
|
|
47
|
+
- Each lab should include exploit explanation, AWGuard output, and fixed pattern.
|
|
48
|
+
|
|
49
|
+
8. GitHub App Or Scheduled Monitor
|
|
50
|
+
- Long-term: run continuously across repositories.
|
|
51
|
+
- Open issues when new agent surfaces appear or risk score drops.
|
|
52
|
+
|
|
53
|
+
## Work Plan
|
|
54
|
+
|
|
55
|
+
### Now
|
|
56
|
+
|
|
57
|
+
- Shipped `--format inventory`.
|
|
58
|
+
- Shipped `--format inventory-json`.
|
|
59
|
+
- Shipped `awguard init`.
|
|
60
|
+
- Shipped `--compare previous.json current.json`.
|
|
61
|
+
- Shipped first policy allowlists with `AWG015`.
|
|
62
|
+
- Expanded `AWG012` coverage to Copilot custom agents, prompts, and skills.
|
|
63
|
+
- Added Docker, GitLab CI, pre-commit, VS Code task, Marketplace, comparison, visual demo, and vulnerable lab assets.
|
|
64
|
+
|
|
65
|
+
### Next
|
|
66
|
+
|
|
67
|
+
- Add agent capability SBOM export for prompts, tools, MCP servers, permissions, and write paths.
|
|
68
|
+
- Add safer patch previews for common workflow permission fixes.
|
|
69
|
+
- Add richer policy ownership fields for approved file owners and review cadence.
|
|
70
|
+
|
|
71
|
+
### Later
|
|
72
|
+
|
|
73
|
+
- Add trend reports for "new agent surface introduced" diffs.
|
|
74
|
+
- Build the vulnerable lab and screenshot-friendly walkthroughs.
|
|
75
|
+
- Explore a GitHub App after the CLI and Action adoption path is stable.
|