fix(security): verify compressed child layers and replace finding fingerprints #60

Merged
gitchegumi merged 5 commits from kiyi/fix-comfy-layer-archive into main 2026-09-25 10:47:34 -05:00
Member

Comfy-UI run 204 finished the two-base image build, then stopped at child-layer DiffID verification before source and malware scans. This change verifies the uncompressed tar digest for gzip child layers while retaining strict signed-parent and payload checks.

Finding reviews now use stable, explicit source rule/path/severity selectors or existing CVE selectors instead of build-dependent fingerprints. Duplicate source occurrences remain blocking. Package-secret reviews retain the exact package version and allowed wheel hashes without depending on the whole Dockerfile digest.

The library repository now scans its own PR checkout with this scanner and policy. Its prior pinned v1.4.3 self-scan rejected the new policy schema in run 370; the updated job keeps the sanitized report artifact.

Validation: 45 focused scanner tests and 11 workflow contract tests pass; workflow YAML parses. The full 203-test suite has 4 failures and 2 errors in the existing Windows /tmp and Linux canary cases; no local Docker build was available. Release this as v1.21.0 before updating callers.

Comfy-UI run [204](https://git.gitchegumi.com/Homelab/Comfy-UI/actions/runs/204/jobs/2/attempt/1) finished the two-base image build, then stopped at child-layer DiffID verification before source and malware scans. This change verifies the uncompressed tar digest for gzip child layers while retaining strict signed-parent and payload checks. Finding reviews now use stable, explicit source rule/path/severity selectors or existing CVE selectors instead of build-dependent fingerprints. Duplicate source occurrences remain blocking. Package-secret reviews retain the exact package version and allowed wheel hashes without depending on the whole Dockerfile digest. The library repository now scans its own PR checkout with this scanner and policy. Its prior pinned v1.4.3 self-scan rejected the new policy schema in [run 370](https://git.gitchegumi.com/Homelab/workflows/actions/runs/370/jobs/1/attempt/1); the updated job keeps the sanitized report artifact. Validation: 45 focused scanner tests and 11 workflow contract tests pass; workflow YAML parses. The full 203-test suite has 4 failures and 2 errors in the existing Windows `/tmp` and Linux canary cases; no local Docker build was available. Release this as `v1.21.0` before updating callers.
Fix compressed layer verification and use stable mitigation selectors
Some checks failed
Workflow acceptance / acceptance (pull_request) Successful in 1m55s
Library checks / tests (pull_request) Successful in 2m46s
Repository security / security-1 (pull_request) Failing after 6m16s
Repository security / security (pull_request) Failing after 0s
96029fb1b3
Scan workflow library PRs with current policy
Some checks failed
Workflow acceptance / acceptance (pull_request) Successful in 2m50s
Library checks / tests (pull_request) Failing after 6m57s
Repository security / security (pull_request) Successful in 7m46s
cc68ab982a
Author
Member

Run 370 failed before evaluating findings because this repository’s security caller used released scanner v1.4.3, which only accepts fingerprint mitigations. Commit cc68ab9 makes the library scan its own PR checkout with the current policy and retains the sanitized report artifact. The 11 workflow contract tests and YAML parse pass locally; the new CI run is pending.

Run [370](https://git.gitchegumi.com/Homelab/workflows/actions/runs/370/jobs/1/attempt/1) failed before evaluating findings because this repository’s security caller used released scanner v1.4.3, which only accepts fingerprint mitigations. Commit `cc68ab9` makes the library scan its own PR checkout with the current policy and retains the sanitized report artifact. The 11 workflow contract tests and YAML parse pass locally; the new CI run is pending.
Count library self-scan report upload
All checks were successful
Repository security / security (pull_request) Successful in 3m45s
Library checks / tests (pull_request) Successful in 4m27s
Workflow acceptance / acceptance (pull_request) Successful in 7m7s
33654708d4
Author
Member

Run 374 found one contract-test mismatch: the new repository self-scan adds a seventh sanitized report upload, while test_reporting.py still expected six. Commit 3365470 updates the assertion to seven. The targeted reporting test and all 11 workflow-contract tests pass locally (12 total); the remaining reporting tests depend on Linux/writable temp paths on this Windows host.

[Run 374](https://git.gitchegumi.com/Homelab/workflows/actions/runs/374/jobs/0/attempt/1) found one contract-test mismatch: the new repository self-scan adds a seventh sanitized report upload, while `test_reporting.py` still expected six. Commit `3365470` updates the assertion to seven. The targeted reporting test and all 11 workflow-contract tests pass locally (12 total); the remaining reporting tests depend on Linux/writable temp paths on this Windows host.
gitchegumi approved these changes 2026-09-25 10:13:56 -05:00
Dismissed
ignore .tools
Some checks failed
Repository security / security (pull_request) Successful in 3m23s
Workflow acceptance / acceptance (pull_request) Has been cancelled
Library checks / tests (pull_request) Has been cancelled
ff587529c6
gitchegumi dismissed gitchegumi's review 2026-09-25 10:17:28 -05:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Preserve required repository security check name
All checks were successful
Workflow acceptance / acceptance (pull_request) Successful in 1m30s
Repository security / security-1 (pull_request) Successful in 2m12s
Library checks / tests (pull_request) Successful in 6m29s
c0412ee508
Author
Member

The self-scan still runs the security scanner and retains its reports; it uses this PR checkout because the released v1.4.3 security.yml cannot parse the new selector policy. Commit c0412ee restores the branch-protection job identity Repository security / security-1 without changing the protection rule. Local workflow-contract and report-upload tests pass (12 total). The new required check is queued on this PR and must pass before merge.

The self-scan still runs the security scanner and retains its reports; it uses this PR checkout because the released v1.4.3 `security.yml` cannot parse the new selector policy. Commit `c0412ee` restores the branch-protection job identity `Repository security / security-1` without changing the protection rule. Local workflow-contract and report-upload tests pass (12 total). The new required check is queued on this PR and must pass before merge.
gitchegumi approved these changes 2026-09-25 10:27:08 -05:00
gitchegumi deleted branch kiyi/fix-comfy-layer-archive 2026-09-25 10:47:34 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Homelab/workflows!60
No description provided.