TEST-INFRA: [ci-pipeline-design] Add security scanning to Dockerfile.server #10954
Merged
HAL9000
merged 10 commits from 2026-06-18 04:36:00 +00:00
chore/ci-dockerfile-server-security-scan into master
Labels
Clear labels
auto/needs-reevaluation
controller-managed
overdue
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Needs Feedback
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
Controller deferred this PR; awaiting Phase 6+ scope-evaluator or operator re-enablement.
Auto-agents controller manages this PR/issue (see tools/controller/deploy/RUNBOOK.md). Remove this label to abandon controller management.
PR blocked by an open issue dependency. Operator must close the dep (or remove the dependency link) before the merge driver can act. Auto-cleared by merge_drive when no open deps remain.
Most recent merge cycle hit CI timeout. Driver excludes this PR while last merge_cycle row is < 30 min old; label persists thereafter as visible history.
Currently being processed by an implementer worker.
Currently being processed by the merge driver.
Currently being processed by a reviewer worker.
Merge driver heartbeat stale; pipeline halted. Closed automatically on next clean tick.
Detected master commit violating the strict merge invariant. Tracked as an issue (not a PR label); kept here for label completeness.
In-cycle escalation: most recent attempt ran at the Tier 0 slot (`tier-0`). Slot's model defined in .opencode/models/tiers.yaml.
In-cycle escalation: most recent attempt ran at the Tier 1 slot (`tier-1`). Slot's model defined in .opencode/models/tiers.yaml.
In-cycle escalation: most recent attempt ran at the Tier 2 slot (`tier-2`). Slot's model defined in .opencode/models/tiers.yaml. Gated behind IMPLEMENTER_ESCALATION_TIER2_ENABLED.
In-cycle escalation: most recent attempt ran at the Tier -1 slot (`tier-min`). Slot's model defined in .opencode/models/tiers.yaml. Suffix is ``-min`` (not ``--1``) so the Forgejo UI reads naturally.
Tracking issues used by the AI Automation system for agents to communicate and report.
Rebase conflict needs LLM conflict-resolver.
Failing CI needs implementer attention.
Documenting a driver incident or rollback.
Reviewer has APPROVED this PR and no later REQUEST_CHANGES is outstanding. The merge driver requires this label to even consider a PR for merging. Set by the reviewer worker on APPROVE; cleared on REQUEST_CHANGES.
Train repeatedly lost master-tempo races. Driver excludes via merge_cycle until cooldown elapses; label persists as visible history.
Revert PR backing out an invariant violation. Fast-tracked through the merge driver.
Sentinel PR duplicated from upstream into a personal fork by tools/duplicate_prs_to_fork.py for pipeline testing. Lives only in the fork; the canonical pipeline never sees it.
No implementer activity for N days. Flagged for human review. Auto-cleared on next push to head branch.
Repeatedly fails on current master (>= 3 ci-fail-on-rebased-sha releases in 12 h). Excluded from driver until human triage.
A ticket in a blocked state and unable to complete until some other task is completed first.
Bounty
$100
A bounty of $100 for any open-source contributor who provides a MR that solves this issue
Bounty
$1000
A bounty of $1000 for any open-source contributor who provides a MR that solves this issue
Bounty
$10000
A bounty of $10000 for any open-source contributor who provides a MR that solves this issue
Bounty
$20
A bounty of $20 for any open-source contributor who provides a MR that solves this issue
Bounty
$2000
A bounty of $2000 for any open-source contributor who provides a MR that solves this issue
Bounty
$250
A bounty of $250 for any open-source contributor who provides a MR that solves this issue
Bounty
$50
A bounty of $50 for any open-source contributor who provides a MR that solves this issue
Bounty
$500
A bounty of $500 for any open-source contributor who provides a MR that solves this issue
Bounty
$5000
A bounty of $5000 for any open-source contributor who provides a MR that solves this issue
Bounty
$750
A bounty of $750 for any open-source contributor who provides a MR that solves this issue
MoSCoW
Could have
Could have feature in order to satisfy the epic/legendary.
MoSCoW
Must have
Must have feature in order to satisfy the epic/legendary.
MoSCoW
Should have
Should have feature in order to satisfy the epic/legendary.
There are questions in the ticket that can not be completed until the project owner provides clarity.
Points
1
1 man-hours worth of work for an expert with no learning curve.
Points
13
13 man-hours worth of work for an expert with no learning curve.
Points
2
2 man-hours worth of work for an expert with no learning curve.
Points
21
21 man-hours worth of work for an expert with no learning curve.
Points
3
3 man-hours worth of work for an expert with no learning curve.
Points
34
34 man-hours worth of work for an expert with no learning curve.
Points
5
5 man-hours worth of work for an expert with no learning curve.
Points
55
55 man-hours worth of work for an expert with no learning curve.
Points
8
8 man-hours worth of work for an expert with no learning curve.
Points
88
88 man-hours worth of work for an expert with no learning curve.
Priority
Backlog
This ticket has backlogged priority and is not to be worked on yet
Priority
CI Blocker
Critical priority issue that blocks CI/CD pipeline and prevents PR merges
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
A ticket for learning a tool or technology that is needed to be able to do future planning and design.
State
Completed
The ticket has been fully implemented, completed, and merged with the source code. This label should only be applied once a ticket is closed.
State
Duplicate
A ticket that represents the same content as an existing ticket.
State
In Progress
A ticket that is actively being developed.
State
In Review
A ticket that has had some code completed to implement but is waiting to pass peer review and is not yet merged in.
State
Paused
This ticket's work started but wasn't finished. It's on hold (likely in a feature branch) and will be resumed later, either due to a blocker or a delay.
State
Unverified
All new tickets start in this state. A developer may set it to show the ticket is unverified. This means we haven't agreed to work on it. It will either move to a verified state or be closed as wontdo.
State
Verified
The issue has been verified by a developer as legitimate. It will be worked on and verified tickets are now considered part of the backlog.
State
Wont Do
This ticket has been decided it wont be done. This may mean the bug has been determined to not be real (cant verify) or the feature is one we have decided we dont want to adopt.
Type
Automation
Any edits or discussion about the AI automated coding system.
Type
Bug
Something that doesnt work as intended.
Type
Discussion
Anytime a ticket represents a discussion about a subject and doesnt fall into one of the other categories.
Type
Documentation
An error or improvement needed in the documentation.
Type
Epic
Any first tier epic. That is, an epic which contains only issues as children and will not have sub-epics.
Type
Feature
Some new functionality not present.
Type
Legendary
A type of Epic which will contain other Epics.
Type
Refactor
A code change that restructures existing code without changing its external behavior.
Type
Support
Someone needs help using the project.
Type
Task
A generic task that doesnt fit into the other type categories.
Type
Testing
Work exclusively focusing on fixing or expanding testing.
No Label
controller-managed
Projects
Clear projects
No project
Assignees
aditya (Aditya Chhabra)
aleenaumair (Aleena Umair)
brent.edwards (Brent Edwards)
CoreRasurae (Luis Mendes)
drew (Drew Morris)
eugen.thaci (Eugen Thaci)
freemo (Jeffrey Phillips Freeman)
HAL9000 (HAL 9000)
HAL9001 (HAL9001)
hamza.khyari (Hamza Khyari)
hurui200320 (Rui Hu)
justin.morris
khird (Kyle Hird)
org.cleveragents
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cleveragents/cleveragents-core#10954
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "chore/ci-dockerfile-server-security-scan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implemented Trivy-based security scanning for the Dockerfile.server image in the CI pipeline. The scan is configured to fail the build on any HIGH or CRITICAL severity vulnerabilities, preventing insecure images from being deployed to production.
Changes
.forgejo/workflows/ci.ymldocker jobAcceptance Criteria
Dockerfile.serverimage using TrivyHIGHorCRITICALseverity findingsCloses #1927
This PR blocks issue #1927
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
This PR implements Trivy-based security scanning for the Dockerfile.server image per issue #1927. The implementation correctly addresses all acceptance criteria: Trivy is installed and run after the server image build, configured to fail on HIGH/CRITICAL findings, and scan results are surfaced in CI output.
However, there are several blocking issues that must be addressed before approval:
BLOCKING Issues:
Insecure Trivy installation method: The
curl | shinstall of Trivy has no version pinning and no checksum/signature verification. This creates a supply chain risk — any compromise of the aquasecurity/trivy repo would inject arbitrary code into every CI run. Pin to a specific release tag and verify checksums (e.g., download the checksum signature file from GitHub releases).Missing Robot Framework integration test: Issue #1927 Definition of Done explicitly requires "Tests (Robot): Add integration test verifying the CI pipeline fails on a known-vulnerable image." This is absent.
Changelog not updated: The PR requirements mandate changelog updates with one entry per commit.
ISSUES CLOSED footer missing: Every commit should include
ISSUES CLOSED: #1927in its footer.No Type/ label applied to the PR: Exactly one Type/ label is required for merge.
Non-blocking Suggestions:
CI GATE: unit_tests was failing (8m51s) and coverage was skipped. The underlying CI failures are pre-existing on master and not introduced by this PR. However per company policy all CI gates must pass before merge. These were not caused by the docker job changes.
COMMIT QUALITY: The commit message correctly matches issue #1927 Metadata (
chore(ci): add vulnerability scanning for Dockerfile.server image), but lacks theISSUES CLOSED: #1927footer required by project conventions. Please rebase and amend with the footer.MISSING TEST REQUIREMENT: Issue #1927 DoD requires Robot Framework integration tests ("Tests (Robot): Add integration test verifying the CI pipeline fails on a known-vulnerable image"). These are absent. This is mandatory and must be added.
MISSING PR REQUIREMENTS: Changelog has not been updated per commit. Also missing exactly one Type/ label — required for merge eligibility.
@@ -469,1 +469,4 @@- name: Security scan Dockerfile.server image with Trivyrun: |PERFORMANCE SUGGESTION: Trivy (~30MB) is downloaded fresh on every CI run. Consider caching with a Docker layer or reusing the binary across runs.
Alternatively, install it as part of a pre-existing setup step shared by other docker job steps to avoid redundant downloads.
@@ -470,0 +472,4 @@run: |# Install Trivyapk add --no-cache curlcurl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/binSECURITY BLOCKER: The Trivy install uses
curl | shwith no version pinning or integrity verification. Any compromise of aquasecurity/trivy repo would inject arbitrary code into every CI run.Suggestion: Pin to a specific Trivy release tag and verify checksums:
Or use the official checksum file from GitHub releases for integrity verification.
@@ -0,0 +95,4 @@assert "trivy" in context.workflow_content.lower(), \"Trivy not configured to provide output"The BDD step definitions for Scenario 3 ("Pipeline fails on high-severity vulnerabilities") only check that strings like "trivy" and "docker" appear in the workflow content. They do not verify the actual semantic behavior — e.g., whether
--exit-code 1is paired with the HIGH,CRITICAL flag.For more robust verification, consider checking that
--exit-code 1appears on the same line as the trivy image command.First review completed. See formal review above with inline comments.
Summary: The Trivy security scanning implementation addresses the issue acceptance criteria correctly, but several blocking concerns must be resolved before approval (see detailed in-line comments).
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
🌱 Grooming: proceed — PR cleared for processing.
(check
no_duplicates, categoryno_duplicates)Comprehensive scan of 355 open PRs found no duplicates. Anchor PR #10954 uniquely solves adding Trivy-based security scanning to Dockerfile.server with build-blocking logic for HIGH/CRITICAL vulnerabilities. While the repo has numerous test-infra and security-related PRs, none address the same Dockerfile scanning scope. Related security PRs target different threats (env var exfiltration, path traversal, command injection); test-infra PRs focus on tool versioning and performance, not container image security scanning.
📋 Estimate: tier 1.
3 files, +214 LOC. Two distinct CI failures: (1) ruff format violation on new BDD step definitions file — trivial fix; (2) 3 BDD scenarios errored (not failed) in the new ci_dockerfile_server_security_scan.feature — Behave "errored" indicates unhandled exceptions in step implementations, most likely the steps invoke real Docker/Trivy tooling unavailable in the CI environment rather than using proper mocks. Fixing requires understanding the codebase's BDD mocking patterns for CI pipeline tests and rewriting the step implementations accordingly. Multi-file scope, test-infrastructure knowledge required, new logic branches in step definitions — tier 1 standard engineering work.
(attempt #4, tier 1)
🔧 Implementer attempt —
resolved.Pushed 1 commit:
b09d254.Files touched:
.forgejo/workflows/ci.yml,CHANGELOG.md,features/steps/ci_dockerfile_server_security_scan_steps.py,robot/ci_dockerfile_server_security_scan.robot.🌱 Grooming: proceed — PR cleared for processing.
(check
no_duplicates, categoryno_duplicates)PR #10954 adds Trivy-based security scanning to Dockerfile.server in the CI pipeline. Scan of 212 open PRs found no semantic overlap: other security PRs address env-var exfiltration, path traversal, or LSP injection; other CI PRs optimize execution or guard jobs on missing secrets. This PR is a focused, unique infrastructure improvement with no duplicate candidates.
📋 Estimate: tier 1.
Multi-file CI infrastructure change (6 files, +294 LOC) touching the Forgejo workflow YAML plus new BDD feature file and step definitions for security scanning verification. All 13 CI gates are currently failing (lint, typecheck, unit/integration/e2e tests, coverage, build, docker), indicating the implementation has systemic issues requiring cross-file debugging. The BDD test infrastructure addition and CI config changes place this squarely in non-trivial territory. Not tier 0 (mechanical) due to new logic, new tests, and widespread CI failure needing diagnosis. Not tier 2 because there is no architectural coupling, concurrency hazard, or algorithmic complexity — just standard CI pipeline + test scaffolding work that needs to be corrected.
9d26ca53b8to21c030ff41(attempt #9, tier 1)
🔧 Implementer attempt —
blocked.Blockers:
a2d4000b76but dispatch base was21c030ff41. The implementer pushed from inside the worktree (forbidden by the git contract) OR a third party pushed during the attempt. Re-dispatch will re-prefetch and pick up the new head.a2d4000b76to6a6cf6fb20(attempt #10, tier 2)
🔧 Implementer attempt —
rebased.Pushed 1 commit:
6a6cf6f.The prior pin used TRIVY_VERSION=0.57.1, but Trivy never published a v0.57.1 tag — the release sequence went v0.57.0 → v0.58.0. The CI docker job consequently failed with `curl: (22) The requested URL returned error: 404` when fetching trivy_0.57.1_Linux-64bit.tar.gz. - Bump TRIVY_VERSION to 0.58.0 (the first stable release after v0.57.0). - Factor the GitHub release base URL into TRIVY_BASE_URL. - Add explicit `set -euo pipefail` so each curl failure surfaces immediately instead of relying on the runner's implicit -e. - Anchor the checksum grep with ` ${TRIVY_TARBALL}$` so a partial filename match cannot smuggle in the wrong checksum line. - Wrap the checksum verification in a subshell so `cd /tmp` does not affect later commands. ISSUES CLOSED: #1927(attempt #12, tier 2)
🔧 Implementer attempt —
blocked.Blockers:
064cb66822but dispatch base wasc9b78f3096. The implementer pushed from inside the worktree (forbidden by the git contract) OR a third party pushed during the attempt. Re-dispatch will re-prefetch and pick up the new head.064cb66822to31664726ff31664726ffto4cde02c6e4a095ba0892to03c8e5fa53✅ Approved
Reviewed at commit
f401a8a.Confidence: medium.
Claimed by
merge_drive.py(pid 3311738) until2026-06-18T05:46:53.051294+00:00.This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.
f401a8a5c5to9805a865cbApproved by the controller reviewer stage (workflow 381).