Skip to content

[REVIEW] pipeline-security: add deploy-time attestation verification gates #1372

@catcherintheroad-hub

Description

@catcherintheroad-hub

Skill Being Reviewed

Skill name: pipeline-security
Skill path: skills/devsecops/pipeline-security/

False Positive Analysis

Benign-looking pipeline that can be over-credited:

build:
  steps:
    - uses: actions/attest-build-provenance@v2
    - run: cosign sign $IMAGE_DIGEST
deploy:
  steps:
    - run: kubectl set image deploy/api api=$IMAGE_TAG

Why this is a false positive:

The build generates provenance and a signature, but the deploy stage does not verify the attestation subject digest, builder identity, issuer, source repository, workflow ref, or SLSA predicate before release. A report can credit SLSA/CICD-SEC-9 controls for producing evidence that is never enforced.

Coverage Gaps

Missed variant 1: tag deployment bypasses attested digest

The build attests sha256:abc, but deployment consumes repo/app:latest or a mutable tag.

Missed variant 2: signature exists but identity constraints are missing

cosign verify runs without checking issuer, subject, certificate identity, repository, workflow ref, or builder ID.

Missed variant 3: provenance is generated but not policy-enforced

No admission controller, deploy gate, or release policy rejects artifacts that lack valid provenance.

Edge Cases

  • Internal artifacts may use private PKI instead of Sigstore, but still need issuer/subject and digest binding evidence.
  • Development environments may warn-only, while production should enforce.
  • Multi-arch images need manifest digest and per-platform provenance handling.

Remediation Quality

  • Fix resolves the vulnerability
  • Fix doesn't introduce new security issues
  • Fix doesn't break functionality
  • Issues found: Add attestation verification evidence gates for deploy-time digest binding, identity constraints, SLSA predicate validation, and policy enforcement.

Comparison to Other Tools

Tool Catches this? Notes
cosign / Sigstore Partial Can verify signatures and identities, but review must check command constraints and enforcement location.
SLSA provenance Partial Defines provenance expectations; deploy policy must consume the provenance.
Admission controllers Partial Kyverno/Gatekeeper/Connaisseur can enforce policies when configured.

Overall Assessment

Strengths: Strong SLSA and CICD-SEC-9 coverage for artifact signing, SBOM, digest pinning, and provenance generation.

Needs improvement: Add verification-side controls so generated attestations are bound to the deployed artifact and enforced before production release.

Priority recommendations:

  1. Add a deploy/release attestation verification gate under CICD-SEC-9.
  2. Require subject digest, issuer/cert identity, source repository/ref, builder identity, and SLSA predicate checks.
  3. Add output fields for verification command/policy, enforcement mode, and exception owner.

Sources Checked

Bounty Info

  • I have read and agree to the CONTRIBUTING.md bounty terms
  • Preferred payment method: GitHub Sponsors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions