← Back to Pull requests

:sparkles: Evaluate more OSPS Level 1 requirements #5520

Merged
justaugustus merged 18 files (1735 lines) on Nov 27, 2026 23:06 UTC
View on GitHub
justaugustus justaugustus commented on Nov 27, 2026 21:49 UTC
Author

What kind of change does this PR introduce?

Feature (experimental): an amendment to the osps-baseline-conformance OpenSpec change, and its implementation.

  • PR title follows the guidelines defined in our pull request documentation
  • What is the current behavior?

    Conformance mode (#5449) evaluates 2 of the 24 active Level 1 (maturity-1) requirements in OSPS Baseline v2026.08.28: OSPS-AC-03.01 and OSPS-AC-03.02. Every other requirement is listed as not evaluated, so tools that want to consume Scorecard's Baseline results instead of running their own checks get little from it; darnit is one (darnitdevorg/darnit#194).

    docs/osps-baseline-coverage.md rates 11 Level 1 requirements as covered or partially covered by probes Scorecard already runs. Nine of them weren't mapped.

    What is the new behavior (if this is a feature change)?

    Conformance mode evaluates those nine, with no new data collection. With AC-03.01 and AC-03.02, that is every Level 1 requirement existing probes give evidence for.

    One rule applies to every mapping, and the spec now states it as the Proxy Evidence requirement: a mapping gives PASS only when its probe observes what the requirement names. Where the probe observes something narrower (the default branch for a requirement about released assets, known patterns for a requirement about all sanitization, any link for a security contact), a clean finding gives NEEDS_REVIEW, and the explanation says what was read. A finding that shows a problem still gives FAIL.

    | Requirement | Probes | Rule |
    | --- | --- | --- |
    | OSPS-BR-01.01 | hasDangerousWorkflowScriptInjection | FAIL on any script-injection finding. NEEDS_REVIEW when none is found: only known patterns are read. |
    | OSPS-BR-01.03 | hasDangerousWorkflowUntrustedCheckout | FAIL on any flagged checkout. NEEDS_REVIEW when none is found: only pull_request_target and workflow_run checkouts of pull request code are read. |
    | OSPS-LE-02.01 | hasFSFOrOSIApprovedLicense | PASS for an approved license, FAIL otherwise. |
    | OSPS-LE-02.02 | hasFSFOrOSIApprovedLicense | FAIL for a license that isn't approved. NEEDS_REVIEW for an approved one: the license was read from the default branch, not from the released assets. |
    | OSPS-LE-03.01 | hasLicenseFile | PASS for a top-level LICENSE, LICENCE, LICENSES, or COPYING file or directory. NEEDS_REVIEW when the probe found only other files it accepts, such as COPYRIGHT or PATENTS. FAIL when it found none. |
    | OSPS-LE-03.02 | hasLicenseFile | FAIL when no license file is found. NEEDS_REVIEW otherwise: the default branch was read, not the released source code or the assets. |
    | OSPS-QA-05.01 | hasBinaryArtifacts, hasUnverifiedBinaryArtifacts | PASS with no binaries. FAIL on any unverified binary. NEEDS_REVIEW when the only binaries are Gradle wrapper JARs that a workflow validates, which are still generated executables. |
    | OSPS-QA-05.02 | hasUnverifiedBinaryArtifacts | PASS with no binaries or only validated Gradle wrapper JARs, FAIL on any other binary. |
    | OSPS-VM-02.01 | securityPolicyPresent, securityPolicyContainsLinks | FAIL when no security policy is found; the explanation lists where Scorecard looked. NEEDS_REVIEW otherwise: the link check matches any URL or email address, not only contacts. |

    Error, NotAvailable, and NotSupported findings give UNKNOWN, per the Probe Outcome Handling requirement, and so does NotApplicable. BR-01.01 and BR-01.03 read only GitHub Actions workflows; a repository without them is UNKNOWN for both, since it may run CI/CD on another system, such as GitLab CI or Azure Pipelines.

    The spec change comes first in the branch: the Proxy Evidence requirement and one evaluation requirement per mapping in specs/conformance-evaluation/spec.md, a "Level 1 evidence coverage" section in design.md, and task section 6. docs/conformance.md and docs/osps-baseline-coverage.md describe the new results.

    ##### Try it

    Build this branch and set a GitHub token, as for any Scorecard run:

    gh pr checkout 5520 --repo ossf/scorecard
    go build -o scorecard .
    export GITHUB_AUTH_TOKEN=<token>
    ./scorecard --repo=github.com/<owner>/<repo> \
      --catalog=osps-baseline --profile=maturity-1 --format=json
    

    For ossf/scorecard, the nine new results are:

    | Requirement | Result | Explanation |
    | --- | --- | --- |
    | OSPS-BR-01.01 | NEEDS_REVIEW | No known script-injection pattern was found in the workflows. Only known patterns were read, so other uses of untrusted metadata need review. |
    | OSPS-BR-01.03 | NEEDS_REVIEW | No checkout of pull request code was found in pull_request_target or workflow_run workflows. Only those two triggers were read, so other ways untrusted code could reach credentials need review. |
    | OSPS-LE-02.01 | PASS | The repository's license is OSI or FSF approved. |
    | OSPS-LE-02.02 | NEEDS_REVIEW | The repository's license is OSI or FSF approved. It was read from the default branch, not from the released assets. |
    | OSPS-LE-03.01 | PASS | The license is in LICENSE. |
    | OSPS-LE-03.02 | NEEDS_REVIEW | The default branch has a license file (LICENSE). The released source code and the release assets were not read. |
    | OSPS-QA-05.01 | PASS | No binary files were found in the repository. |
    | OSPS-QA-05.02 | PASS | No binary files were found in the repository. |
    | OSPS-VM-02.01 | NEEDS_REVIEW | A security policy was found (SECURITY.md). It contains a URL or email address, which may or may not be a contact. |

    The cmd conformance tests run the published release, so they now expect the nine new results. The conformance and Gemara fixtures come from a test-only release, so they don't change.

  • Tests for the changes have been added (for bug fixes/features)
  • Which issue(s) this PR fixes

    NONE

    Related:

  • #5452: graduation criteria for conformance mode. I'll propose there that mapping every Level 1 requirement with probe evidence be one of them.

  • #5507: the Security-Policy check misses policies under doc/ and .gitlab/. Fixing it extends securityPolicyPresent and corrects VM-02.01 with no mapping change.

  • #5470: retargeted docs/osps-baseline-coverage.md to v2026.08.28.

  • darnitdevorg/darnit#194: darnit running Scorecard once for many controls.
  • Special notes for your reviewer

    Reading order: the spec delta, then design.md, then internal/conformance/ospsbaseline.

    Four choices I'd like checked:

    1. BR-01.03 fails on any flagged checkout. The probe also flags checkouts guarded by an if: condition, such as a required label, and doesn't read job permissions; the explanation says so. NEEDS_REVIEW would mean BR-01.03 could never pass or fail, since a clean result is already NEEDS_REVIEW, and the Dangerous-Workflow check already gives the same finding its minimum score.
    2. No workflows gives UNKNOWN for BR-01.01 and BR-01.03, rather than NOT_APPLICABLE: the spec says NotApplicable findings can't by themselves produce NOT_APPLICABLE, and the project may build elsewhere. The Dangerous-Workflow check is likewise inconclusive with no workflows.
    3. QA-05.01 fails on any unverified binary. Scorecard doesn't separate generated executables from other binaries.
    4. VM-02.01 fails when no policy is found, even though the probe looks only in fixed locations (#5507). The explanation lists them, so a project with a policy elsewhere can see why.

    Not in this PR: Level 2 and 3 requirements that existing probes could map (OSPS-AC-04.02, QA-03.01, QA-07.01), and the 13 Level 1 requirements that need new probes, an administrator token, or data the project supplies.

    Does this PR introduce a user-facing change?

    ``release-note
    Experimental conformance mode (
    --catalog=osps-baseline) now evaluates nine more OSPS Baseline Level 1 requirements from existing probes: OSPS-BR-01.01, OSPS-BR-01.03, OSPS-LE-02.01, OSPS-LE-02.02, OSPS-LE-03.01, OSPS-LE-03.02, OSPS-QA-05.01, OSPS-QA-05.02, and OSPS-VM-02.01. Where a probe observes less than a requirement asks, a clean result is NEEDS_REVIEW rather than PASS.
    ``

    Diff: 1735 lines (+1713 / -22) across 18 files Reviewer: spencerschrock Review duration: 76m
    All Vouch review confidence checks passed
    Residual risk 0.41 = Change Risk (0.72) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.72 · 1735 lines diff across 18 files
    0.72
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Shallow Review Depth shallow_review_depth
    0.344
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    1 comments
    "Review active on #5520"
    general weight: 0.35
    Assignees
    justaugustus justaugustus
    Labels
    risk: medium confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 71.5% (HIGH) · Higher = larger blast radius
    71.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 40.8% · Moderate risk
    40.8%
    Repository