Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.

## Unreleased

- Add v0.2 adoption examples for advisory, config/baseline, and blocking rollout modes.

## 0.2.0 - 2026-07-05

- Add config file support for rule disabling, severity overrides, path excludes, and narrow suppressions.
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ jobs:
output: awi-guard-report.md
```

See [docs/adoption.md](docs/adoption.md) for rollout guidance. SARIF upload examples are available in [examples/sarif-upload.yml](examples/sarif-upload.yml).
See [docs/adoption.md](docs/adoption.md) for rollout guidance. Ready-to-copy
workflow examples are available in [examples](examples), including advisory,
config/baseline, blocking, and SARIF upload modes.

## Current maturity

Expand All @@ -111,6 +113,7 @@ See:

- [docs/configuration.md](docs/configuration.md)
- [docs/baselines-and-suppressions.md](docs/baselines-and-suppressions.md)
- [examples](examples)

## Package smoke test

Expand Down
11 changes: 11 additions & 0 deletions docs/adoption.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ jobs:

See [configuration](configuration.md) and [baselines and suppressions](baselines-and-suppressions.md).

## Ready-to-copy Examples

Use the examples that match your rollout stage:

- [Advisory mode](../examples/advisory.yml): start here to collect findings without failing CI.
- [Config and baseline mode](../examples/config-and-baseline.yml): use this when known findings need planned cleanup.
- [Blocking mode](../examples/fail-on-high.yml): use this when the workflow is quiet enough to fail on high and critical findings.
- [SARIF upload](../examples/sarif-upload.yml): use this when you want code scanning alerts.

Example config and baseline files are available in [examples](../examples).

## Responsible Use

Only scan repositories you own or are authorized to assess. Do not mass-report findings to public projects. Use synthetic examples for demos and issue reports.
9 changes: 7 additions & 2 deletions docs/baselines-and-suppressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,25 @@ Baselines and suppressions are both ways to manage accepted findings, but they s

Use a baseline when a repository has existing findings and you want CI to focus on new findings. Use a suppression when a specific finding has been reviewed and accepted for a documented reason.

See [config and baseline workflow example](../examples/config-and-baseline.yml),
[example config](../examples/awi-guard.config.example.yml), and
[example baseline](../examples/awi-guard.baseline.example.json) for a practical
GitHub Actions setup.

## Baselines

Create a baseline from the current scan:

```bash
npx agentic-workflow-guard scan --write-baseline awi-guard.baseline.json
npx @jin0/agentic-workflow-guard scan --write-baseline awi-guard.baseline.json
```

When `--write-baseline` is used without an explicit `--fail-on`, the scan exits successfully after writing the baseline.

Use it in later scans:

```bash
npx agentic-workflow-guard scan --baseline awi-guard.baseline.json
npx @jin0/agentic-workflow-guard scan --baseline awi-guard.baseline.json
```

Baseline files use stable fingerprints:
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
`agentic-workflow-guard` works without a config file. Add `awi-guard.config.yml` when a repository needs rule overrides, path excludes, or narrow suppressions.

```bash
npx agentic-workflow-guard scan --config awi-guard.config.yml
npx @jin0/agentic-workflow-guard scan --config awi-guard.config.yml
```

## Example
Expand Down
26 changes: 26 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Examples

These examples show common `v0.2` adoption paths. Start with advisory mode, use
config and baselines to manage known findings, then move to blocking mode once
the workflow is quiet.

| Example | Use when |
| --- | --- |
| [advisory.yml](advisory.yml) | You want visibility without failing CI yet |
| [config-and-baseline.yml](config-and-baseline.yml) | You have existing findings and want CI to focus on new risk |
| [fail-on-high.yml](fail-on-high.yml) | You are ready to block high and critical findings |
| [sarif-upload.yml](sarif-upload.yml) | You want code scanning alerts from SARIF output |

## Example Config and Baseline Files

- [awi-guard.config.example.yml](awi-guard.config.example.yml) shows rule
overrides, path excludes, and a narrow suppression.
- [awi-guard.baseline.example.json](awi-guard.baseline.example.json) shows the
baseline file shape. Generate real baselines with:

```bash
npx @jin0/agentic-workflow-guard scan --write-baseline awi-guard.baseline.json
```

Keep suppressions and baselines narrow. Prefer fixing high-risk workflow patterns
when possible.
26 changes: 26 additions & 0 deletions examples/advisory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Agentic Workflow Guard advisory

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
awi-guard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jinyounghub/agentic-workflow-guard@v0
with:
paths: .github/workflows
fail-on: never
format: markdown
output: awi-guard-report.md
- uses: actions/upload-artifact@v4
if: always()
with:
name: awi-guard-report
path: awi-guard-report.md
10 changes: 10 additions & 0 deletions examples/awi-guard.baseline.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": 1,
"findings": [
{
"id": "R107",
"file": ".github/workflows/ai-review.yml",
"fingerprint": "0123456789abcdef01234567"
}
]
}
13 changes: 13 additions & 0 deletions examples/awi-guard.config.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
rules:
R107:
severity: medium

exclude:
paths:
- ".github/workflows/generated/**"

suppressions:
- id: R104
file: ".github/workflows/ai-review.yml"
reason: "AI output is rendered as report text and is not executed."
expires: "2026-12-31"
28 changes: 28 additions & 0 deletions examples/config-and-baseline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Agentic Workflow Guard with config and baseline

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
awi-guard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jinyounghub/agentic-workflow-guard@v0
with:
paths: .github/workflows
config: awi-guard.config.yml
baseline: awi-guard.baseline.json
fail-on: high
format: markdown
output: awi-guard-report.md
- uses: actions/upload-artifact@v4
if: always()
with:
name: awi-guard-report
path: awi-guard-report.md
8 changes: 5 additions & 3 deletions examples/fail-on-high.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Agentic Workflow Guard fail on high
name: Agentic Workflow Guard blocking

on:
pull_request:
push:
branches: [main]

permissions:
contents: read
Expand All @@ -15,5 +17,5 @@ jobs:
with:
paths: .github/workflows
fail-on: high
format: sarif
output: awi-guard.sarif
format: markdown
output: awi-guard-report.md
Loading