fix: lowercase image names before Trivy scans to resolve image-ref parse error#1205
Merged
Conversation
…error Agent-Logs-Url: https://github.com/GrammaTonic/github-runner/sessions/1c7eaa54-0cc1-4c87-b23b-5f3b62b1097b Co-authored-by: GrammaTonic <8269379+GrammaTonic@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
GrammaTonic
April 13, 2026 01:52
View session
GrammaTonic
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Pull Request Description
🔀 Merge Strategy
This repository uses a DUAL merge strategy:
develop: Squash merge (one clean commit per feature)develop→main: Regular merge (preserves shared history, no back-sync needed)Why this approach?
developkeeps one commit per feature/fixdevelop→mainpreserves commit ancestrydeveloprepresents a complete, logical changedevelopdevelopdevelopHow to Create a PR (Recommended):
How to Merge (Recommended):
Branch Sync Requirements:
mainbranch:git pull origin maindevelopbranch:git pull origin developQuick sync commands:
ℹ️ No back-sync needed! Because
develop→mainuses a regular merge (not squash), both branches share the same commit history. There is no divergence after merging.Summary
IMAGE_NAME: ${{ github.repository }}evaluates toGrammaTonic/github-runner(mixed case). Trivy rejects this inimage-refbecause the OCI spec mandates lowercase image names — causing all container security scan and SBOM jobs to fail.docker/metadata-actionhandles lowercasing during builds transparently, but the Trivy steps reference the env var directly with no transformation.Type of Change
🔄 Changes Made
Files Modified
.github/workflows/ci-cd.yml— AddedSet lowercase image namesstep in all 4 jobs that pass image refs directly to TrivyKey Changes
security-container-scan— lowercaseIMAGE_NAMEbefore Trivy scansecurity-chrome-scan— lowercaseIMAGE_CHROME_NAMEbefore Trivy scansecurity-chrome-go-scan— lowercaseIMAGE_CHROME_GO_NAMEbefore Trivy scansbom-vuln-validation— lowercase all three image name vars before SBOM generation and vuln scansEach affected job now has this step inserted after docker login and before the first Trivy invocation:
🧪 Testing
Testing Performed
Test Coverage
Manual Testing Steps
could not parse reference: ghcr.io/GrammaTonic/github-runner📸 Screenshots/Demos
Failure log (before fix):
🔒 Security Considerations
📚 Documentation
🚀 Deployment Notes
✅ Checklist
🤖 AI Review Request
/cc @copilot
Note for Reviewers: