Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7fff8b4
Add multi-agent isolation strategy using git worktrees (#2)
don-petry Mar 28, 2026
2761820
feat: add weekly compliance audit workflow (#12)
don-petry Apr 5, 2026
a9ffaa7
chore: run compliance audit every Friday at noon UTC
Apr 5, 2026
369ce47
feat: add full CI pipeline for .github repo (#15)
don-petry Apr 5, 2026
9d5b9b9
feat: extend compliance audit with CI/automation health survey (#13)
don-petry Apr 6, 2026
c832040
chore(deps): Bump anthropics/claude-code-action from 1.0.83 to 1.0.89…
dependabot[bot] Apr 6, 2026
f13806c
feat: split Claude workflow into interactive + issue automation jobs …
don-petry Apr 6, 2026
c1861f4
feat: require GitHub Discussions on all repos (#53)
don-petry Apr 6, 2026
272cfb7
fix: grant claude-issue job tools to create PRs and check CI (#55)
don-petry Apr 6, 2026
b6446ad
fix: add concurrency guard and comment tools to claude-issue job
Apr 6, 2026
d531697
fix: add claude.yml template + checkout audit check (#63)
claude[bot] Apr 6, 2026
77e2c2c
fix: auto-create required labels during compliance audit (#67)
claude[bot] Apr 6, 2026
0b7c2b1
feat: reusable Claude Code workflow with workflows write permission (…
don-petry Apr 6, 2026
4eed707
Add Feature Ideation workflow as standard for BMAD-enabled repos (#81)
don-petry Apr 7, 2026
7c4ca76
feat(workflows): centralize standards via reusable workflows (#87)
don-petry Apr 8, 2026
3e29bf6
feat(workflows): pin reusable callers to @v1 and document tier model …
don-petry Apr 8, 2026
3f3ca02
feat(security): add codeql.yml for SAST scanning (#100)
don-petry Apr 8, 2026
ebe0a2d
Replace per-repo CodeQL workflows with GitHub default setup (#103)
don-petry Apr 9, 2026
6a615a6
feat(claude): trigger Claude to fix CI failures on PRs (#148)
don-petry Apr 17, 2026
76c5014
feat(feature-ideation): add curated reputable source list for Mary (#…
don-petry Apr 17, 2026
0a3185d
fix: correct reusable workflow path syntax (remove duplicate .github)…
don-petry Apr 21, 2026
5a9b79f
fix(claude-ci-fix): resolve PR via API when check_run payload is empty
don-petry Apr 21, 2026
8def087
docs: document OIDC immutability constraint and exempt claude.yml fro…
don-petry Apr 25, 2026
61056fd
fix: restore double .github path in agent-shield and claude reusable …
don-petry May 3, 2026
3e7d340
feat: trigger Claude on CodeRabbit and Copilot review comments (#198)
don-petry May 6, 2026
660242a
chore: deprecate pr-review-agent — remove all traces
don-petry May 11, 2026
27d9f76
feat: make pr-review-mention an org standard (#237)
don-petry May 11, 2026
f35d659
fix(claude): add copilot-pull-request-reviewer and gemini-code-assist…
don-petry May 11, 2026
430cb71
fix(feature-ideation): address Copilot + CodeRabbit review on PR #85 …
don-petry May 12, 2026
aaa4b9a
feat(claude): add claude-fix-review-comments job for bot review respo…
don-petry May 13, 2026
914d3e5
chore(dev-lead): deprecate claude.yml in ci-standards, promote dev-le…
don-petry May 16, 2026
471dbf0
chore(deps): Bump actions/upload-artifact from 4.6.2 to 7.0.1 (#303)
dependabot[bot] May 17, 2026
8a47e63
feat: implement issue #251 — Compliance: secret_scanning_ai_detection…
don-petry May 20, 2026
2076eba
docs: document fine-grained token scopes for ORG_SCORECARD_TOKEN (#248)
don-petry Jun 8, 2026
c2cbc1a
fix(dependabot-rebase): handle 404 from compare API — skip PR when br…
don-petry Jun 8, 2026
f20c5c3
fix(ci): downgrade pnpm/action-setup to v5 in dependency-audit reusab…
don-petry Jun 8, 2026
7bf84fc
feat: add compliance-remediate.sh — close the audit -> auto-fix -> PR…
don-petry Jun 8, 2026
6869f70
fix(ci): add gitleaks secret-scan job to satisfy compliance check (#219)
don-petry Jun 11, 2026
12ea428
feat: implement issue #375 — Compliance audit — 2026-05-29 (#376)
don-petry Jun 11, 2026
a844a58
chore: remove deprecated claude.yml from standards (#379)
don-petry Jun 11, 2026
c92b291
fix: enable delete_branch_on_merge on .github repo (#222)
don-petry Jun 11, 2026
b16ab61
fix(ci): pin claude-code-reusable.yml ref to @v1 (#218)
don-petry Jun 15, 2026
84abb80
fix: replace standalone dependency-audit.yml with org standard thin c…
don-petry May 14, 2026
1d42e1a
chore: apply manual instructions [skip ci-relay]
donpetry-bot Jun 8, 2026
6e43358
fix: remove duplicate sections and jobs causing lint failures
donpetry-bot Jun 28, 2026
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
223 changes: 19 additions & 204 deletions .github/workflows/dependency-audit.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# Dependency vulnerability audit.
# Detects ecosystems and runs appropriate audit tools (npm, pnpm, Go, Rust, Python).
# Standard: https://github.com/petry-projects/.github/blob/main/standards/dependabot-policy.md#vulnerability-audit-ci-check
# ─────────────────────────────────────────────────────────────────────────────
# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependency-audit.yml
# Standard: petry-projects/.github/standards/ci-standards.md#7-dependency-audit-dependency-audityml
# Reusable: petry-projects/.github/.github/workflows/dependency-audit-reusable.yml
#
# Auto-detects ecosystems present in the repository and runs the appropriate
# audit tool. Fails the build if any dependency has a known security advisory.
# AGENTS — READ BEFORE EDITING:
# • This file is a THIN CALLER STUB. All ecosystem-detection and audit logic
# lives in the reusable workflow above.
# • You MAY change: nothing in this file in normal use. Adopt verbatim.
# • You MUST NOT change: trigger events, the `uses:` line, or job name
# (used as a required status check).
# • If you need different behaviour (new ecosystem, tool version bump),
# open a PR against the reusable in the central repo.
# ─────────────────────────────────────────────────────────────────────────────
#
# Add "dependency-audit" as a required status check in branch protection.
#
# Pinned tool versions (update deliberately):
# govulncheck v1.1.4 | cargo-audit 0.22.1 | pip-audit 2.9.0
# Dependency vulnerability audit — thin caller for the org-level reusable.
# To adopt: copy this file to .github/workflows/dependency-audit.yml in your repo.
# Add "dependency-audit / Detect ecosystems" as a required status check
# in branch protection.
name: Dependency audit

on:
Expand All @@ -21,198 +29,5 @@ permissions:
contents: read

jobs:
detect:
name: Detect ecosystems
runs-on: ubuntu-latest
outputs:
npm: ${{ steps.check.outputs.npm }}
pnpm: ${{ steps.check.outputs.pnpm }}
gomod: ${{ steps.check.outputs.gomod }}
cargo: ${{ steps.check.outputs.cargo }}
pip: ${{ steps.check.outputs.pip }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4

- name: Detect package ecosystems
id: check
run: |
# npm — look for package-lock.json anywhere (excluding node_modules)
if find . -name 'package-lock.json' -not -path '*/node_modules/*' | grep -q .; then
echo "npm=true" >> "$GITHUB_OUTPUT"
else
echo "npm=false" >> "$GITHUB_OUTPUT"
fi

# pnpm — look for pnpm-lock.yaml anywhere
if find . -name 'pnpm-lock.yaml' -not -path '*/node_modules/*' | grep -q .; then
echo "pnpm=true" >> "$GITHUB_OUTPUT"
else
echo "pnpm=false" >> "$GITHUB_OUTPUT"
fi

# Go modules — detect via go.mod (not go.sum, which may not exist)
if find . -name 'go.mod' -not -path '*/vendor/*' | grep -q .; then
echo "gomod=true" >> "$GITHUB_OUTPUT"
else
echo "gomod=false" >> "$GITHUB_OUTPUT"
fi

# Cargo — detect via Cargo.toml anywhere (lockfile may not exist for libraries)
if find . -name 'Cargo.toml' -not -path '*/target/*' | grep -q .; then
echo "cargo=true" >> "$GITHUB_OUTPUT"
else
echo "cargo=false" >> "$GITHUB_OUTPUT"
fi

# Python — detect pyproject.toml or requirements.txt anywhere
if find . -name 'pyproject.toml' -not -path '*/.venv/*' -not -path '*/venv/*' | grep -q . || \
find . -name 'requirements.txt' -not -path '*/.venv/*' -not -path '*/venv/*' | grep -q .; then
echo "pip=true" >> "$GITHUB_OUTPUT"
else
echo "pip=false" >> "$GITHUB_OUTPUT"
fi

audit-npm:
name: npm audit
needs: detect
if: needs.detect.outputs.npm == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "lts/*"

- name: Audit npm dependencies
run: |
# Audit each package-lock.json found in the repo
status=0
while IFS= read -r dir; do
echo "::group::npm audit $dir"
if ! (cd "$dir" && npm audit --audit-level=low); then
status=1
fi
echo "::endgroup::"
done < <(find . -name 'package-lock.json' -not -path '*/node_modules/*' -exec dirname {} \;)
exit $status

audit-pnpm:
name: pnpm audit
needs: detect
if: needs.detect.outputs.pnpm == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4

- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v4

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "lts/*"

- name: Audit pnpm dependencies
run: |
# Audit each pnpm-lock.yaml found in the repo
status=0
while IFS= read -r dir; do
echo "::group::pnpm audit $dir"
if ! (cd "$dir" && pnpm audit --audit-level low); then
status=1
fi
echo "::endgroup::"
done < <(find . -name 'pnpm-lock.yaml' -not -path '*/node_modules/*' -exec dirname {} \;)
exit $status

audit-go:
name: govulncheck
needs: detect
if: needs.detect.outputs.gomod == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4

- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v5
with:
go-version: "stable"

- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@v1.1.4

- name: Audit Go dependencies
run: |
status=0
while IFS= read -r dir; do
echo "::group::govulncheck $dir"
if ! (cd "$dir" && govulncheck ./...); then
status=1
fi
echo "::endgroup::"
done < <(find . -name 'go.mod' -not -path '*/vendor/*' -exec dirname {} \;)
exit $status

audit-cargo:
name: cargo audit
needs: detect
if: needs.detect.outputs.cargo == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4

- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

- name: Install cargo-audit
run: cargo install cargo-audit@0.22.1 --locked

- name: Audit Cargo dependencies
run: |
# cargo audit operates on Cargo.lock at workspace root
# For workspaces, a single audit at root covers all crates
status=0
while IFS= read -r dir; do
echo "::group::cargo audit $dir"
if ! (cd "$dir" && cargo generate-lockfile 2>/dev/null; cargo audit); then
status=1
fi
echo "::endgroup::"
done < <(find . -name 'Cargo.toml' -not -path '*/target/*' -exec dirname {} \; | sort -u)
exit $status

audit-pip:
name: pip-audit
needs: detect
if: needs.detect.outputs.pip == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4

- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.x"

- name: Install pip-audit
run: pip install pip-audit==2.9.0

- name: Audit Python dependencies
run: |
status=0
# Audit each Python project found in the repo
while IFS= read -r dir; do
echo "::group::pip-audit $dir"
if [ -f "$dir/pyproject.toml" ]; then
if ! pip-audit "$dir"; then
status=1
fi
elif [ -f "$dir/requirements.txt" ]; then
if ! pip-audit -r "$dir/requirements.txt"; then
status=1
fi
fi
echo "::endgroup::"
done < <(
{
find . -name 'pyproject.toml' -not -path '*/.venv/*' -not -path '*/venv/*' -exec dirname {} \;
find . -name 'requirements.txt' -not -path '*/.venv/*' -not -path '*/venv/*' -exec dirname {} \;
} | sort -u
)
exit $status
dependency-audit:
uses: petry-projects/.github/.github/workflows/dependency-audit-reusable.yml@d3d768dabb7f28cc63283cdfe48630da53700e50 # v1
23 changes: 23 additions & 0 deletions scripts/compliance-audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,29 @@ ensure_required_labels() {
done
}

# Create all required labels (idempotent — uses --force to update if present)
ensure_required_labels() {
local repo="$1"
# Format: "name|color|description" (pipe-delimited to avoid colon conflicts)
local label_configs=(
"security|d93f0b|Security-related PRs and issues"
"dependencies|0075ca|Dependency update PRs"
"scorecard|d93f0b|OpenSSF Scorecard findings"
"bug|d73a4a|Bug reports"
"enhancement|a2eeef|Feature requests"
"documentation|0075ca|Documentation changes"
)

for config in "${label_configs[@]}"; do
IFS='|' read -r name color description <<< "$config"
gh label create "$name" \
--repo "$ORG/$repo" \
--description "$description" \
--color "$color" \
--force 2>/dev/null || true
done
}

create_issue_for_finding() {
local repo="$1" category="$2" check="$3" severity="$4" detail="$5" standard_ref="$6"

Expand Down
5 changes: 5 additions & 0 deletions standards/ci-standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ In addition, BMAD Method-enabled repositories MUST also include the conditional
documented below — see [`standards/workflows/feature-ideation.yml`](workflows/feature-ideation.yml)
for the template.

In addition, BMAD Method-enabled repositories MUST also include the conditional
[Feature Ideation workflow](#9-feature-ideation-feature-ideationyml--bmad-method-repos)
documented below — see [`standards/workflows/feature-ideation.yml`](workflows/feature-ideation.yml)
for the template.

### 1. CI Pipeline (`ci.yml`)

The primary build-and-test workflow. Structure varies by tech stack but must include:
Expand Down
2 changes: 1 addition & 1 deletion standards/workflows/dependency-audit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ─────────────────────────────────────────────────────────────────────────────
# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependency-audit.yml
# Standard: petry-projects/.github/standards/ci-standards.md#5-dependency-audit-dependency-auditym
# Standard: petry-projects/.github/standards/ci-standards.md#7-dependency-audit-dependency-audityml
# Reusable: petry-projects/.github/.github/workflows/dependency-audit-reusable.yml
#
# AGENTS — READ BEFORE EDITING:
Expand Down
Loading