feat: refresh gh-aw-node digest and replace manual scanner installs with gh aw compile flags#47958
Conversation
…lity scanner to use gh aw compile builtin flags Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
…gest in test - Pin GrypeImage to anchore/grype:v0.116.0 (was :latest) - Pin GrantImage to anchore/grant:v0.6.8 (was :latest) - Remove manual 'Pull security scanner Docker images' step from daily-squid-image-scan.md - Fix TestCollectDockerImages_SafeOutputsAddsGhAwNodeImage: update hardcoded gh-aw-node digest to sha256:a8082161... (missed in previous commit) - Recompile all 261 lock files Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in the latest commit. Here's what was addressed: Remove predownload container step — Removed the Pin grant, grype to release ref in Go — gh-aw-node in gh-aw-manifest — |
There was a problem hiding this comment.
Pull request overview
Refreshes the gh-aw-node digest and simplifies daily container scanning through built-in compiler scanners.
Changes:
- Synchronizes the new node image digest across pin data, tests, and generated workflows.
- Pins Grype and Grant versions.
- Refactors the daily image scan workflow around
--syft --grype --grant.
Show a summary per file
| File | Description |
|---|---|
.github/aw/actions-lock.json |
Updates the canonical node digest. |
pkg/actionpins/data/action_pins.json |
Synchronizes action-pin data. |
pkg/workflow/data/action_pins.json |
Synchronizes embedded workflow pins. |
pkg/workflow/docker_pin_test.go |
Updates expected digest assertions. |
pkg/cli/docker_images.go |
Pins Grype and Grant release tags. |
.github/workflows/daily-squid-image-scan.md |
Replaces the bespoke scan job with compiler scanners. |
.github/workflows/daily-squid-image-scan.lock.yml |
Compiles the refactored scan workflow. |
.github/workflows/*.lock.yml (260 remaining files) |
Regenerates workflows with the refreshed node digest. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (3)
.github/workflows/daily-squid-image-scan.md:42
- The scan can now pass when compilation or any scanner fails.
|| truediscards the compiler status, and non-strict Syft/Grype/Grant failures are only printed as* scan failedwarnings; the post-step merely checks that this output file exists and greps two finding patterns. Record and gate the compiler exit status and explicitly fail on scanner operational-error messages, preserving the previousoperational_errorsgate.
.github/workflows/daily-squid-image-scan.md:71 - The agent cannot actually review the promised Syft SBOM.
--syftwrites JSON under/tmp/gh-aw-syft-sboms, but without--verboseneither its path nor contents reachcompile-output.txt, and the bash allowlist only permits reading that text file. Expose and allow-read the SBOM artifacts, or remove the Syft-review requirement.
.github/workflows/daily-squid-image-scan.md:42 - The built-in scanner path never resolves each mutable image tag's current digest, so this workflow no longer detects image updates even though its description still promises update scanning. Restore the
imagetools inspectdigest comparison (or explicitly narrow the workflow's stated scope) rather than silently dropping that signal.
- Files reviewed: 112/267 changed files
- Comments generated: 2
- Review effort level: Medium
| - name: Run compile with vulnerability scanners | ||
| continue-on-error: true | ||
| uses: actions/download-artifact@v8.0.1 | ||
| with: | ||
| name: container-image-scan | ||
| path: /tmp/gh-aw/agent/image-scan | ||
| - name: Ensure image scan summary exists | ||
| if: always() | ||
| env: | ||
| DOWNLOAD_OUTCOME: ${{ steps.download_scan.outcome }} | ||
| run: | | ||
| results="/tmp/gh-aw/agent/image-scan" | ||
| mkdir -p "$results" | ||
| if [ "$DOWNLOAD_OUTCOME" != "success" ] || | ||
| ! jq -e 'type == "object"' "$results/summary.json" > /dev/null 2>&1; then | ||
| jq -n '{ | ||
| images: [], | ||
| total_vulnerabilities: 0, | ||
| critical_vulnerabilities: 0, | ||
| fixable_vulnerabilities: 0, | ||
| license_rejected: false, | ||
| operational_errors: ["The scan job did not publish a valid result artifact."], | ||
| tools: { | ||
| syft: "unknown", | ||
| grype: "unknown", | ||
| grant: "unknown" | ||
| } | ||
| }' > "$results/summary.json" | ||
| fi | ||
| set -uo pipefail | ||
| output_dir="/tmp/gh-aw/agent/image-scan" | ||
| mkdir -p "$output_dir" | ||
| "$GITHUB_WORKSPACE/gh-aw" compile --syft --grype --grant 2>&1 | tee "$output_dir/compile-output.txt" || true |
There was a problem hiding this comment.
Acknowledged. The compiler's built-in --syft/--grype/--grant flags currently resolve to the runner's native architecture (linux/amd64 on GitHub-hosted runners) and do not support per-platform child-digest enumeration. This is a genuine coverage reduction compared to the old explicit platform-iteration loop.
Adding multi-arch/--platform support to the compiler scanners is out of scope for this PR (it would require changes to the CheckAndPrepareDockerImages → StartDockerImageDownload path and the scanner invocations). The daily-squid-image-scan workflow's primary purpose here is simplified operation via the compiler's built-in flags; the arm64 coverage gap can be addressed as a follow-up once multi-platform support is added to the compiler.
| GrypeImage = "anchore/grype:v0.116.0" | ||
| GrantImage = "anchore/grant:v0.6.8" |
There was a problem hiding this comment.
Fixed in the latest commit. Syft, Grype, and Grant are now pinned by immutable manifest digest alongside the human-readable version tag in pkg/cli/docker_images.go:
anchore/syft:v1.48.0@sha256:b4f1df79f97b817682d8b5ff941eb6bfe74f6172553a5e312c75bbc2eabc405canchore/grype:v0.116.0@sha256:fd4ab4d1042b522c896e73bdf09ab8bf384fa417df99d6dd0d6e1008c7e7c821anchore/grant:v0.6.8@sha256:172463611795f43b77302cdfbd7b3f81295492a7330e0820cfe41c3674920237
|
@copilot this branch has merge conflicts. Please run Run: https://github.com/github/gh-aw/actions/runs/30152885438
|
|
@copilot merge main and recompile |
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Merged |
|
@copilot merge main and recompile |
…digest Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Completed in the latest commit. All 261 workflows recompiled cleanly after merging
Done — merged 6 new commits from |
|
🎉 This pull request is included in a new release. Release: |
Bumps the pinned
gh-aw-nodeimage digest and replaces the manual syft/grype/grant binary installation in the daily container vulnerability workflow with the built-ingh aw compile --syft --grype --grantflags.gh-aw-node digest bump
sha256:529d02e→sha256:a808216Updated in:
.github/aw/actions-lock.json(source of truth)pkg/actionpins/data/action_pins.json,pkg/workflow/data/action_pins.json(viamake sync-action-pins)pkg/workflow/docker_pin_test.go(hardcoded expected value).lock.ymlfiles (viamake recompile)daily-squid-image-scan refactor
Removes the separate
scan_imagepre-job and its ~300-line shell script that manually downloaded, checksum-verified, and ran syft/grype/grant binaries. Replaces with agent pre-steps that buildgh-awand invoke the compiler's built-in scanner flags:The post-step gates now grep the compiler text output for
[Critical](grype) andlicense policy violation:(grant) instead of parsing a bespoke JSON summary. Other changes:packages: readadded to permissions,goadded to network allowlist, timeout raised to 90 min.