Skip to content

ci: add required supply-chain scan on every PR#6530

Merged
lpcox merged 4 commits into
mainfrom
ci-supply-chain-scan
Jul 23, 2026
Merged

ci: add required supply-chain scan on every PR#6530
lpcox merged 4 commits into
mainfrom
ci-supply-chain-scan

Conversation

@lpcox

@lpcox lpcox commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a deterministic (non-agentic) CI workflow that runs the gh-aw supply-chain scanners on every pull request:

gh aw compile --strict --syft --grype --grant

The Anchore scanners run via Docker (preinstalled on ubuntu-latest) against the container images recorded in the gh-aw-manifest headers of the compiled .github/workflows/*.lock.yml files:

  • --syft — generate a Software Bill of Materials (SBOM) per image
  • --grype — scan images for known CVEs / insecure libraries
  • --grant — enforce the license allowlist in .grant.yaml

--strict makes any finding or scan error fail the job, so this is a real gate rather than warning-only.

Files

  • .github/workflows/supply-chain-scan.yml — the workflow (installs pinned gh-aw CLI v0.83.1, triggers on all PRs + workflow_dispatch)
  • .grant.yaml — license allowlist (MIT, Apache-2.0, BSD-2/3-Clause, ISC). Added at the repo root because --grant requires it and fails without it.

Required check

The Compile + Syft/Grype/Grant status check has been added to the "CI passes before merging to main" repository ruleset, so it is required before merge (existing 17 checks preserved → now 18).

Add a deterministic (non-agentic) workflow that runs
`gh aw compile --strict --syft --grype --grant` on every pull request.

The Anchore scanners run via Docker against the container images recorded
in the compiled `*.lock.yml` manifests:
- --syft:  generate an SBOM per image
- --grype: scan for known CVEs / insecure libraries
- --grant: enforce the license allowlist in `.grant.yaml`

`--strict` makes any finding or scan error fail the job so it acts as a
real gate. Add `.grant.yaml` at the repo root since `--grant` requires it.

The "Compile + Syft/Grype/Grant" check is added to the "CI passes before
merging to main" ruleset so it is required before merge.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 92b2407f-7d59-464d-afe7-bc21bd71bddb
Copilot AI review requested due to automatic review settings July 23, 2026 15:43
@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 98.96% 98.99% 📈 +0.03%
Statements 98.88% 98.91% 📈 +0.03%
Functions 99.41% 99.41% ➡️ +0.00%
Branches 95.30% 95.30% ➡️ +0.00%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a required pull-request supply-chain scan for compiled agentic workflows.

Changes:

  • Adds Syft, Grype, and Grant scanning via gh-aw.
  • Introduces a repository-wide container license policy.
Show a summary per file
File Description
.grant.yaml Defines permitted container-package licenses.
.github/workflows/supply-chain-scan.yml Runs supply-chain scans for pull requests and manual dispatches.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 4
  • Review effort level: Medium

Comment thread .grant.yaml
Comment on lines +8 to +12
- MIT
- Apache-2.0
- BSD-2-Clause
- BSD-3-Clause
- ISC
Comment thread .github/workflows/supply-chain-scan.yml Outdated
- name: Compile with supply-chain scanners
env:
GH_TOKEN: ${{ github.token }}
run: gh aw compile --strict --syft --grype --grant
Comment thread .github/workflows/supply-chain-scan.yml Outdated
# preinstalled on GitHub-hosted `ubuntu-latest` runners. `--strict` makes any
# finding or scan error fail the job so this acts as a real gate.
#
# To make this a *required* check, add "Supply Chain Scan / scan" to the
Comment thread .github/workflows/supply-chain-scan.yml Outdated

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
@lpcox

lpcox commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot address review feedback

…t policy

- Fix .grant.yaml: derive allowlist from actual syft scans of squid/agent/api-proxy
  images; set require-known-license: false for Ubuntu's non-SPDX license strings
- Fix workflow line 16: correct required-check context name to
  'Supply Chain Scan / Compile + Syft/Grype/Grant'
- Fix workflow line 38: update actions/checkout to v7.0.1 SHA
  (3d3c42e5) matching the rest of the repo (was v6.0.2 SHA mislabelled as v4)
- Fix workflow line 50: remove mutable --grype/--grant flags from gh aw compile;
  replace with explicit Docker steps pinned to reviewed digests:
  grype v0.116.0 (sha256:fd4ab4d1) and grant v0.6.8 (sha256:17246361)
  with GHCR auth via docker login + packages: read permission

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@copilot address review feedback

Addressed all four review findings in commit ci: address PR review feedback:

.grant.yaml (allowlist too narrow) — Re-derived the allowlist from actual syft scans of the squid (Alpine 3.24), agent (Ubuntu 22.04), and api-proxy (node:alpine) images. Added the GPL/LGPL/MPL/GFDL families and other permissive identifiers (0BSD, curl, BlueOak-1.0.0, CC0-1.0, SIL-OFL-1.1, etc.) that are genuinely present. Changed require-known-license: true → false — Ubuntu/Debian packages emit hundreds of non-SPDX strings (e.g. GPL-2+, Artistic, file-content hashes) that syft cannot normalise; treating them as failures would block every Ubuntu-derived image scan while adding no security value. Known SPDX identifiers are still gated by the allowlist.

Scanner pinning (line 50) — Removed --grype --grant from gh aw compile and replaced them with two explicit docker run steps that pin the scanner images to reviewed digests: anchore/grype@sha256:fd4ab4d1... (v0.116.0) and anchore/grant@sha256:17246361... (v0.6.8). A preceding docker login ghcr.io step (enabled by a new packages: read permission) handles GHCR auth for private images. The lock-file manifest headers are parsed in Python to extract the exact pinned-digest image references for each scan.

Ruleset context name (line 16) — Updated the comment from "Supply Chain Scan / scan" (the job key) to "Supply Chain Scan / Compile + Syft/Grype/Grant" (the actual GitHub check context).

Checkout SHA annotation (line 38) — Replaced the v6.0.2 SHA (de0fac2e) mislabelled # v4 with the same v7.0.1 SHA (3d3c42e5) used throughout the rest of the repository.

Copilot finished work on behalf of lpcox July 23, 2026 16:09
@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

Smoke test completed. Connectivity failed (000).

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — Service connectivity failed ⚠️

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing reports failed. OTel tracing regression detected. ⚠️

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Contribution Check completed successfully!

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

@github-actions

Copy link
Copy Markdown
Contributor

🔬 Smoke Test Results

Test Status
GitHub MCP Connectivity ✅ (filtered by policy — MCP reachable)
GitHub.com HTTP ✅ 200
File Write/Read ⚠️ File not found (pre-step may not have run)

Overall: PASS (core connectivity verified)

cc @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode ✅ PASS

All tests passed:

  • ✅ GitHub MCP connectivity
  • ✅ GitHub.com HTTP 200
  • ✅ File write/read verified
  • ✅ BYOK inference path active (api-proxy → api.githubcopilot.com)

Running in direct BYOK mode with COPILOT_PROVIDER_API_KEY via api-proxy sidecar. Agent sees placeholder credential only.

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results — Auth mode: PAT (COPILOT_GITHUB_TOKEN)

Test Result
GitHub MCP connectivity ⚠️ Filtered by secrecy policy
GitHub.com HTTP ✅ 200
File write/read ⚠️ Template vars unexpanded

Overall: PARTIAL — core connectivity confirmed; pre-step data unavailable due to unexpanded template variables.

🔑 PAT report filed by Smoke Copilot PAT
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR — the change is clear, but it looks like it’s missing the contribution checks called out in CONTRIBUTING.md:

  • Tests for new functionality (Code Style / Testing / Pull Request Process): there isn’t any accompanying test or validation for the new workflow/license policy.
  • Related issue reference (Pull Request Process): the description doesn’t link to a related issue or tracking ticket.

If this is intentionally testless because the workflow itself is the validation, a short note in the PR description explaining that would help reviewers.

Generated by Contribution Check for #6530 · gpt54mini 3.17 AIC · ⊞ 22.1K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Result
API status ✅ PASS
gh check ✅ PASS
File status ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #6530 · haiku45 54.6 AIC · ⊞ 6.4K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🔒 Smoke Test: Copilot Network Isolation

EGRESS_RESULT allow=pass deny=pass

  • ✅ Allowed domain (api.github.com): HTTP 200
  • ✅ Blocked domain (example.com): Connection denied (403 from proxy)

Overall: PASS — egress enforcement working as expected.

Thanks @lpcox!

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Jul 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor
  • chore: upgrade gh-aw extension to v0.83.0 (pre-release)
  • [Test Coverage] fix: dns-preresolution test fails on runners with github.com in /etc/hosts
  • GitHub PR query: ✅
  • GitHub title check: ✅
  • Smoke file + cat: ✅
  • Build: ✅
  • Overall status: PASS

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.13 Python 3.12.13 ✅ YES
Node.js v24.18.0 v22.23.1 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: ❌ FAILED — Node.js version mismatch (host v24.18.0 vs chroot v22.23.1).

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Gemini Engine Smoke Test Results

Overall Status: FAIL

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • localhost

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

💎 Faceted by Smoke Gemini
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

@lpcox
Fix bug in logging: ✅
Add feature X: ✅
GitHub.com connectivity: ✅
File write/read test: ✅
BYOK inference: ✅
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)
Overall: PASS

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A ✅ PASS
.NET json-parse N/A ✅ PASS
Go color 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx passed ✅ PASS
Node.js execa passed ✅ PASS
Node.js p-limit passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Generated by Build Test Suite for #6530 · sonnet46 37.4 AIC · ⊞ 8.3K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🔥 Smoke Test: Docker Sbx Validation

Test Status
GitHub MCP connectivity ⚠️ Filtered by secrecy policy
GitHub.com HTTP ⚠️ Pre-step data unavailable (template not substituted)
File write/read ⚠️ Pre-step data unavailable (template not substituted)

Overall: INCONCLUSIVE — pre-computed step outputs were not injected into the prompt (raw ${{ }} placeholders). Tests could not be fully verified.

📰 BREAKING: Report filed by Smoke Docker Sbx
Add label ready-for-aw to run again

lpcox and others added 2 commits July 23, 2026 10:20
The supply-chain-scan compile step used `gh aw compile --strict`, which
forced repo-wide strict validation and rejected 24 workflows that pin
`sandbox.mcp.version` (an internal implementation detail disallowed in
strict mode). The Syft/Grype/Grant scanners don't require strict, so drop
the flag: `gh aw compile --syft`.

Separately, make the smoke/build-test workflows build awf/firewall from
the repo's own source and use the compiler-default MCP gateway image:

- Remove `sandbox.mcp.version` and `sandbox.agent.version` pins from 22
  workflow .md files. Without the mcp pin the compiler uses its default
  gateway (v0.4.3) instead of the stale pinned v0.3.x.
- Empty the postprocess release-mode exclusion set so the
  network-isolation variants also build locally (--build-local); the
  injected full-repo checkout makes that valid everywhere.
- Update the now-inaccurate "no local builds" note in
  build-test-network-isolation.md.

Recompiled all lock files and re-ran postprocess-smoke-workflows.ts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1076089d-35ad-4339-8143-58e140987894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants