Skip to content

Fix(scorecard): Hard-code the scan runner label - #116

Merged
ModeSevenIndustrialSolutions merged 2 commits into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/scorecard-publish-runner
Sep 30, 2026
Merged

ModeSevenIndustrialSolutions merged 2 commits into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/scorecard-publish-runner

Conversation

@ModeSevenIndustrialSolutions

@ModeSevenIndustrialSolutions ModeSevenIndustrialSolutions commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

The OpenSSF Scorecard lane has never published a result. The Scorecard
API re-verifies the producing workflow on every publish and reads the
scan job's runs-on label from the file as written. It does not
evaluate expressions, so runs-on: ${{ inputs.runs_on }} is rejected
whatever the caller passes:

Unable to POST scorecard results to webapp: http response 400 ...
workflow verification failed: scorecard job should have exactly 1
'Ubuntu' virtual environment

ossf/scorecard-action logs this as a warning and exits 0, so every run
is green. Consequences:

  • This repository's public score is frozen at 7.1 (2026-07-28,
    Scorecard v5.3.0, from the old lfit workflow). The score the lane
    actually computes today is 7.8.
  • Every caller of the lane is rejected the same way, e.g. onap/cps
    run 36126944896 (v0.8.0).

Changes

Rebased onto main after #114 and #118 merged. The maven-xml-settings-action repin this PR used to carry landed separately in #118, so it is no longer part of this branch.

Commit 1: Fix(scorecard): Hard-code the scan runner label

  • Scan job runs-on is now a literal ubuntu-latest.
  • The runs_on input and its validation step are removed. It offered
    nothing the API accepts: the verifier's pattern is
    ^ubuntu-(latest|NN.NN)(-arm)?$ with a 22.04 floor, which also rejects the -N-cores
    labels the validation allowed. No known caller passes runs_on
    (checked onap/cps, onap/policy-opa-pdp, lfreleng-actions/.github).
  • tests/workflow-steps.sh mirrors the API's scan-job checks (literal
    Ubuntu label, no job env/defaults/container/services, id-token: write only on the
    scan job, permitted actions only), because a green run cannot catch a
    regression here.
  • docs/BRIEF.md D15 claimed publishing had been verified live. The
    only published result predates the lane, so that passage is corrected.
  • The example drops the runs_on line.

Commit 2: Fix(scorecard): Tighten the publish-rule guard (Copilot
review)

  • The verifier also requires any versioned label to be at least 22.04.
    The guard now applies both tests and proves it accepts ubuntu-latest,
    ubuntu-22.04 and ubuntu-24.04-arm, and rejects ubuntu-20.04,
    ubuntu-latest-8-cores and ubuntu-buildbox. The lane comment and D15
    state the floor.
  • The guard asserts the scan job has no container or services, and
    that it holds id-token: write.
  • The guard requires scan to be the one job running
    ossf/scorecard-action. The API checks whichever job runs it, so this
    anchors every other assertion.
  • Fixes a flaw in the env/defaults assertion: yq binds | looser than
    or, so a job-level defaults passed. Each of the four keys now
    fails the harness when injected.

Behaviour change

runs_on is no longer an input. A caller that passed it will fail with
an undefined-input error on upgrade. That is louder than today's silent
publish failure, and it never worked.

Validation

  • tests/workflow-steps.sh: 83/83 pass on the rebased branch. Against the lane on main, the
    new runs-on check fails as intended; with a run: step and a foreign
    action injected, the step-list check fails naming both.
  • zizmor --persona auditor .github/ examples/: no findings.
  • prek run: all hooks pass. aislop ci --staged: no scored files
    changed (YAML/Markdown/shell).
  • The real proof is post-merge: the push-triggered
    openssf-scorecard-self.yaml run should log no Unable to POST
    warning, and api.securityscorecards.dev should show a fresh date.

Not addressed here

The remaining Pinned-Dependencies alerts are all uses: $/... lines,
which Scorecard v5.5.0 misreads as unpinned third-party actions
(ossf/scorecard#5232; fix pending in ossf/scorecard#5191). Reverting to
./ would reintroduce zizmor self-repository findings.

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions requested review from a team and a balanced review from Copilot September 25, 2026 12:06
@github-actions github-actions Bot added the bug Something isn't working label Sep 25, 2026

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings September 25, 2026 12:12

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

ModeSevenIndustrialSolutions added a commit to modeseven-lfreleng-actions/security-workflows that referenced this pull request Sep 30, 2026
Copilot review rounds 1 to 3.

Separate the release count from the issue count. The twelve releases
end at v0.9.1, but the twentieth issue, lfreleng-actions#74, closed when PR lfreleng-actions#114
merged three hours after that tag, so the headline implied it had
shipped. It now says lfreleng-actions#74 waits for v0.9.2, as Remaining work does.

State what the per-PR harness covers, and no more. It runs only on
pull requests changing a workflow or a test, not on every one; it
covers the lanes' validation and hook steps, not their builds, scans
or the Nexus IQ upload; and mutation testing sampled its checks
rather than proving each can fail. Three passages claimed more.

Describe sbom-action's Gradle support as it stands. v0.2.0 runs
cyclonedx-gradle-plugin, with its own gradle_plugin_version input;
the document still said the Gradle plugin was yet to join.

Add PR lfreleng-actions#116 to the immediate work. The openssf-scorecard lane has
never published a result: the Scorecard API rejects its
expression-valued runs-on, and scorecard-action exits 0, so every
run is green while nothing arrives, for callers such as onap/cps
too. The plan omitted this and called v0.9.2 unnecessary for
callers. It now leads the immediate work with a release and proof
of publication, and names the defect where the lanes are listed
and in the risk register.

Call the sibling actions references, not dependencies: no workflow
here uses grype-scan-action, sbom-action or python-sbom-action.

Date the CLM lane's size, now 326 lines of run: shell in a 1,188-
line file on main, rather than quote an earlier snapshot as current.

Update the passages still saying no fixture carries a 'toolchain'
directive. test-go-project declares go 1.25 and toolchain go1.25.0,
and assert-go-toolchain enforces it, but D21 in the BRIEF and two
comments in testing.yaml described the skip branch as the live path.
The branch stays as a guard against the fixture losing its
directive; only its wording and its pointer to the closed lfreleng-actions#75
change, so no behaviour does.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
ModeSevenIndustrialSolutions added a commit to modeseven-lfreleng-actions/security-workflows that referenced this pull request Sep 30, 2026
Copilot review rounds 1 to 4.

Separate the release count from the issue count. The twelve releases
end at v0.9.1, but the twentieth issue, lfreleng-actions#74, closed when PR lfreleng-actions#114
merged three hours after that tag, so the headline implied it had
shipped. It now says lfreleng-actions#74 waits for v0.9.2, as Remaining work does.

State what the per-PR harness covers, and no more. It runs only on
pull requests changing a workflow or a test, not on every one; it
covers the lanes' validation and hook steps, not their builds, scans
or the Nexus IQ upload; and mutation testing sampled its checks
rather than proving each can fail. Three passages claimed more.

Describe sbom-action's Gradle support as it stands. v0.2.0 runs
cyclonedx-gradle-plugin, with its own gradle_plugin_version input;
the document still said the Gradle plugin was yet to join.

Add PR lfreleng-actions#116 to the immediate work. The openssf-scorecard lane has
never published a result: the Scorecard API rejects its
expression-valued runs-on, and scorecard-action exits 0, so every
run is green while nothing arrives, for callers such as onap/cps
too. The plan omitted this and called v0.9.2 unnecessary for
callers. It now leads the immediate work with a release and proof
of publication, and names the defect where the lanes are listed
and in the risk register.

Call the sibling actions references, not dependencies: no workflow
here uses grype-scan-action, sbom-action or python-sbom-action.

Date the CLM lane's size, now 326 lines of run: shell in a 1,188-
line file on main, rather than quote an earlier snapshot as current.

Update the passages still saying no fixture carries a 'toolchain'
directive. test-go-project declares go 1.25 and toolchain go1.25.0,
and assert-go-toolchain enforces it, but D21 in the BRIEF and two
comments in testing.yaml described the skip branch as the live path.
The branch stays as a guard against the fixture losing its
directive; only its wording and its pointer to the closed lfreleng-actions#75
change, so no behaviour does.

Count the adoption table in calls, not files. Two workflow files,
onap/policy-opa-pdp security-audits.yaml and onap/multicloud-framework
gerrit-clm.yaml, call the lanes twice, so 61 files make 63 calls:
v0.5.0 rises to 4 and v0.8.0 to 17. Each file was read in full; the
search fragments alone undercount.

Order the immediate work by prerequisite. Provisioning the fixture's
Sonar project and IQ application, and settling the IQ credential,
now come before the testing.yaml dispatch that depends on them, and
the lfreleng-actions#116 merge leads, with its proof following the v0.9.2 release.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
ModeSevenIndustrialSolutions added a commit to modeseven-lfreleng-actions/security-workflows that referenced this pull request Sep 30, 2026
Copilot review rounds 1 to 5.

Separate the release count from the issue count. The twelve releases
end at v0.9.1, but the twentieth issue, lfreleng-actions#74, closed when PR lfreleng-actions#114
merged three hours after that tag, so the headline implied it had
shipped. It now says lfreleng-actions#74 waits for v0.9.2, as Remaining work does.

State what the per-PR harness covers, and no more. It runs only on
pull requests changing a workflow or a test, not on every one; it
covers the lanes' validation and hook steps, not their builds, scans
or the Nexus IQ upload; and mutation testing sampled its checks
rather than proving each can fail. Three passages claimed more.

Describe sbom-action's Gradle support as it stands. v0.2.0 runs
cyclonedx-gradle-plugin, with its own gradle_plugin_version input;
the document still said the Gradle plugin was yet to join.

Add PR lfreleng-actions#116 to the immediate work. The openssf-scorecard lane has
never published a result: the Scorecard API rejects its
expression-valued runs-on, and scorecard-action exits 0, so every
run is green while nothing arrives, for callers such as onap/cps
too. The plan omitted this and called v0.9.2 unnecessary for
callers. It now leads the immediate work, and the defect is named
where the lanes are listed and in the risk register.

Call the sibling actions references, not dependencies: no workflow
here uses grype-scan-action, sbom-action or python-sbom-action.

Date the CLM lane's size, now 326 lines of run: shell in a 1,188-
line file on main, rather than quote an earlier snapshot as current.

Update the passages still saying no fixture carries a 'toolchain'
directive. test-go-project declares go 1.25 and toolchain go1.25.0,
and assert-go-toolchain enforces it, but D21 in the BRIEF and two
comments in testing.yaml described the skip branch as the live path.
The branch stays as a guard against the fixture losing its
directive; only its wording and its pointer to the closed lfreleng-actions#75
change, so no behaviour does.

Count the adoption table in calls, not files. Two workflow files,
onap/policy-opa-pdp security-audits.yaml and onap/multicloud-framework
gerrit-clm.yaml, call the lanes twice, so 61 files make 63 calls:
v0.5.0 rises to 4 and v0.8.0 to 17. Each file was read in full; the
search fragments alone undercount.

Order the immediate work by prerequisite. Provisioning the fixture's
Sonar project and IQ application, and settling the IQ credential,
now come before the testing.yaml dispatch that depends on them, and
the lfreleng-actions#116 merge leads.

Prove Scorecard publishing only after the release that carries the
fix. The merge item claimed the proof before v0.9.2 shipped; the
proof is now its own item, and graph node, after the release.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
ModeSevenIndustrialSolutions added a commit to modeseven-lfreleng-actions/security-workflows that referenced this pull request Sep 30, 2026
Copilot review rounds 1 to 6.

Separate the release count from the issue count. The twelve releases
end at v0.9.1, but the twentieth issue, lfreleng-actions#74, closed when PR lfreleng-actions#114
merged three hours after that tag, so the headline implied it had
shipped. It now says lfreleng-actions#74 waits for v0.9.2, as Remaining work does.

State what the per-PR harness covers, and no more. It runs only on
pull requests changing a workflow or a test, not on every one; it
covers the lanes' validation and hook steps, not their builds, scans
or the Nexus IQ upload; and mutation testing sampled its checks
rather than proving each can fail. Three passages claimed more.

Describe sbom-action's Gradle support as it stands. v0.2.0 runs
cyclonedx-gradle-plugin, with its own gradle_plugin_version input;
the document still said the Gradle plugin was yet to join.

Add PR lfreleng-actions#116 to the immediate work. The openssf-scorecard lane has
never published a result: the Scorecard API rejects its
expression-valued runs-on, and scorecard-action exits 0, so every
run is green while nothing arrives, for callers such as onap/cps
too. The plan omitted this and called v0.9.2 unnecessary for
callers. It now leads the immediate work, and the defect is named
where the lanes are listed and in the risk register.

Call the sibling actions references, not dependencies: no workflow
here uses grype-scan-action, sbom-action or python-sbom-action.

Date the CLM lane's size, now 326 lines of run: shell in a 1,188-
line file on main, rather than quote an earlier snapshot as current.

Update the passages still saying no fixture carries a 'toolchain'
directive. test-go-project declares go 1.25 and toolchain go1.25.0,
and assert-go-toolchain enforces it, but D21 in the BRIEF and two
comments in testing.yaml described the skip branch as the live path.
The branch stays as a guard against the fixture losing its
directive; only its wording and its pointer to the closed lfreleng-actions#75
change, so no behaviour does.

Count the adoption table in calls, not files. Two workflow files,
onap/policy-opa-pdp security-audits.yaml and onap/multicloud-framework
gerrit-clm.yaml, call the lanes twice, so 61 files make 63 calls:
v0.5.0 rises to 4 and v0.8.0 to 17. Each file was read in full; the
search fragments alone undercount.

Order the immediate work by prerequisite. Provisioning the fixture's
Sonar project and IQ application now comes before the testing.yaml
dispatch that depends on it, and the lfreleng-actions#116 merge leads. The IQ
credential folds into that dispatch, the only thing that can test
it, with a retry once the secret is corrected.

Prove Scorecard publishing only after the release that carries the
fix. The merge item claimed the proof before v0.9.2 shipped; the
proof is now its own item, and graph node, after the release. Its
test is a fresh API result whose date and commit match a v0.9.2
run, not a changed score: a working fix may score the same, and
the API already holds older results for onap/cps and this
repository.

Name the lfreleng-actions#116 defect where the issue inventory says what work
remains, rather than calling none of it a defect.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
ModeSevenIndustrialSolutions added a commit to modeseven-lfreleng-actions/security-workflows that referenced this pull request Sep 30, 2026
Copilot review rounds 1 to 7.

Separate the release count from the issue count. The twelve releases
end at v0.9.1, but the twentieth issue, lfreleng-actions#74, closed when PR lfreleng-actions#114
merged three hours after that tag, so the headline implied it had
shipped. It now says lfreleng-actions#74 waits for v0.9.2, as Remaining work does.

State what the per-PR harness covers, and no more. It runs only on
pull requests changing a workflow or a test, not on every one; it
covers the lanes' validation and hook steps, not their builds, scans
or the Nexus IQ upload; and mutation testing sampled its checks
rather than proving each can fail. Three passages claimed more.

Describe sbom-action's Gradle support as it stands. v0.2.0 runs
cyclonedx-gradle-plugin, with its own gradle_plugin_version input;
the document still said the Gradle plugin was yet to join.

Add PR lfreleng-actions#116 to the immediate work. The openssf-scorecard lane has
never published a result: the Scorecard API rejects its
expression-valued runs-on, and scorecard-action exits 0, so every
run is green while nothing arrives, for callers such as onap/cps
too. The plan omitted this and called v0.9.2 unnecessary for
callers. It now leads the immediate work, and the defect is named
where the lanes are listed and in the risk register.

Call the sibling actions references, not dependencies: no workflow
here uses grype-scan-action, sbom-action or python-sbom-action.

Date the CLM lane's size, now 326 lines of run: shell in a 1,188-
line file on main, rather than quote an earlier snapshot as current.

Update the passages still saying no fixture carries a 'toolchain'
directive. test-go-project declares go 1.25 and toolchain go1.25.0,
and assert-go-toolchain enforces it, but D21 in the BRIEF and three
comments in testing.yaml described the skip branch as the live path,
or the fixture's toolchain edit as still pending.
The branch stays as a guard against the fixture losing its
directive; only its wording and its pointer to the closed lfreleng-actions#75
change, so no behaviour does.

Count the adoption table in calls, not files. Two workflow files,
onap/policy-opa-pdp security-audits.yaml and onap/multicloud-framework
gerrit-clm.yaml, call the lanes twice, so 61 files make 63 calls:
v0.5.0 rises to 4 and v0.8.0 to 17. Each file was read in full; the
search fragments alone undercount.

Order the immediate work by prerequisite. Provisioning the fixture's
Sonar project and IQ application now comes before the testing.yaml
dispatch that depends on it, and the lfreleng-actions#116 merge leads. The IQ
credential folds into that dispatch, the only thing that can test
it, with a retry once the secret is corrected.

Prove Scorecard publishing only after the release that carries the
fix. The merge item claimed the proof before v0.9.2 shipped; the
proof is now its own item, and graph node, after the release. Its
test is a fresh API result whose date and commit match a v0.9.2
run, not a changed score: a working fix may score the same, and
the API already holds older results for onap/cps and this
repository.

Name the lfreleng-actions#116 defect where the issue inventory says what work
remains, rather than calling none of it a defect.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
The Scorecard API re-verifies the workflow on every publish and reads
the scan job's runs-on label from the file as written. It does not
evaluate expressions, so 'runs-on: ${{ inputs.runs_on }}' fails with
HTTP 400 ('scorecard job should have exactly 1 Ubuntu virtual
environment') whatever the caller passes. scorecard-action logs that
as a warning and exits 0, so every run looked green while nothing was
published: this repository's public score is frozen at 2026-07-28 and
the lane's callers are rejected the same way.

The label is now a literal ubuntu-latest and the runs_on input, with
its validation step, is gone. It offered nothing the API accepts: the
verifier also rejects the -N-cores larger-runner labels the validation
allowed. No known caller passes it.

tests/workflow-steps.sh now mirrors the API's scan-job checks (literal
Ubuntu label, no env or defaults, id-token confined to the scan job,
permitted actions only), since a green run cannot catch a regression.
docs/BRIEF.md D15 claimed publishing had been verified live; the only
published result predates the lane, so that passage is corrected.

https://github.com/ossf/scorecard-action#workflow-restrictions

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
Address Copilot review feedback on the scan-job guard.

- Runner floor (inline): the Scorecard API's isSupportedUbuntuRunner
  also requires any versioned label to be at least 22.04, which the
  guard, the lane comment and docs/BRIEF.md D15 omitted, so
  ubuntu-20.04 passed. hosted_ubuntu() now applies the pattern and
  the floor, and the harness proves it accepts ubuntu-latest,
  ubuntu-22.04 and ubuntu-24.04-arm and rejects ubuntu-20.04,
  ubuntu-latest-8-cores and ubuntu-buildbox. The comment and D15
  name the floor.
- Container and services (review overview, no inline thread): the
  API rejects a scan job with either; the guard now asserts both are
  absent.
- OIDC (inline): the guard checked only that other jobs lack
  id-token: write, so dropping it from the scan job, which publishing
  needs, stayed green. It now asserts the scan job holds it.
- Anchoring (inline): with the Run analysis step removed, every
  remaining step was permitted and the guard stayed green, though the
  API rejects a file in which no job runs ossf/scorecard-action. The
  API checks whichever job runs it, so the guard now requires that to
  be scan and only scan, which anchors every other assertion.

Adding that check exposed a flaw in the env/defaults assertion: yq
binds '|' looser than 'or', so only env was tested against the job
and a job-level defaults block passed. Both checks are parenthesised,
and each of env, defaults, container and services now fails the
harness when injected.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 14:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused workflow fix is consistent with the Scorecard verifier and is protected by appropriate regression checks.

Review effort: Balanced
Findings: None

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit 4da5165 into lfreleng-actions:main Sep 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants