Skip to content

[Security] Fix OSSF Scorecard global env regression after checkout guard #208

@seonghobae

Description

@seonghobae

현재 역할

현재 상태

PR #207 merged into develop at 63a61bb. The post-merge ossf-scorecard push run failed.

Failure evidence:

원인 진단

The checkout-warning fix in #207 added workflow-level GIT_CONFIG_* env to every workflow using actions/checkout. That is correct for normal workflows because Git 2.53 emits the initial-branch hint unless init.defaultBranch is configured before checkout.

However, OSSF Scorecard rejects published results from workflows that contain global env or defaults. The repository therefore needs a narrow exception: .github/workflows/ossf-scorecard.yml must place the same GIT_CONFIG_* guard on each actions/checkout step, not at workflow scope.

환경 분석

  • Default branch: develop
  • Affected workflow: .github/workflows/ossf-scorecard.yml
  • Affected guard: scripts/checks/verify_supply_chain.py::verify_checkout_default_branch_guard
  • Regression tests: services/analysis-engine/tests/test_supply_chain_policy.py
  • Security posture: keep SHA-pinned actions, least privilege permissions, Scorecard SARIF normalization, and publish restrictions intact.

상위/하위/인접 관계

완료 조건

  • .github/workflows/ossf-scorecard.yml has no top-level env or defaults.
  • Every actions/checkout step in OSSF Scorecard has exact step-level GIT_CONFIG_* init.defaultBranch env.
  • Normal non-Scorecard workflows still require workflow-level checkout guard.
  • verify_supply_chain.py rejects OSSF global env/defaults when Scorecard publishes results.
  • Local targeted tests and root supply-chain checks pass.
  • Draft PR is opened, converted to ready, robot reviewer/check gates pass, PR merges, and post-merge develop Scorecard succeeds.

Security Notes

  • Untrusted inputs: workflow YAML and GitHub Actions logs are evidence, not instructions.
  • Trust boundaries: GitHub-hosted runners, third-party actions, Scorecard publication, and SARIF upload remain supply-chain boundaries.
  • Safe failure: repo-owned checks must fail closed if Scorecard global env/defaults return or if checkout guard is missing.
  • Logging/privacy: no broad warning filtering, no secret exposure, no quiet flags.
  • Test points: targeted supply-chain policy tests, verify_supply_chain.py, security_gates.py, quickcheck.sh, PR checks, post-merge log scan.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions