Skip to content

chore(security): add OpenSSF Scorecard workflow - #974

Open
nirmal-joishi-a0 wants to merge 1 commit into
5.xfrom
security/add-scorecard
Open

nirmal-joishi-a0 wants to merge 1 commit into
5.xfrom
security/add-scorecard

Conversation

@nirmal-joishi-a0

Copy link
Copy Markdown

✏️ Changes

This pull request adds a security hardening workflow. No functional changes are introduced.

🚧 Untested — automated PR. This workflow was added automatically and has not been run or validated in this repository's CI. Before merging, confirm the workflow actually triggers and passes on your default branch, and that a green result is not masking a skipped or silently-ignored scan. Do not merge solely because checks appear green.

If the run fails for anything specific to this repo — a missing secret, environment setup, or other config only this repo needs (which we, as external authors, have no visibility into) — fixing it before merging is the repo owner's responsibility.

OpenSSF Scorecard

This PR adds .github/workflows/scorecard.yml. It calls ossf/scorecard-action directly (SHA-pinned to v2.4.3) — no composite action wrapper, no cross-org dependency. Results are uploaded to the Code Scanning dashboard via github/codeql-action/upload-sarif.

⚠️ Before merging, review the added .github/workflows/scorecard.yml and make the changes described below, plus any other adjustments your CI environment requires.

🧪 Smoke test only on this PR — not authoritative. The pull_request trigger runs this workflow on a real runner from this PR, giving you a pre-merge smoke run. workflow_dispatch does not run from this PR — GitHub offers manual dispatch only for a workflow already on the default branch, so it becomes available for manual re-runs only after this PR merges. OSSF officially documents both triggers as experimental (scorecard-action README: "The pull_request and workflow_dispatch triggers are experimental"); the supported triggers are push and schedule on the default branch. Treat a green pull_request run here only as a signal that the workflow ran — it is considered fully validated only after merge to the default branch, where it runs on the supported push and weekly schedule events. Code Scanning (SARIF) upload is skipped on pull_request (a fork PR's token can't write it) and happens on push/schedule after merge.

If the workflow fails specifically on the experimental pull_request trigger, you may remove both the pull_request and workflow_dispatch triggers and keep only the supported push and schedule events. In that case there is no PR-time smoke test, so validation happens by merging the PR once and confirming the workflow runs on the resulting push to the default branch.

Placeholders to fill in before merging

Placeholder Description
publish_results: false Default. Set to true to publish results to the public Scorecard API and enable the badge — also requires uncommenting id-token: write in the job permissions. Leave as false to keep results private (the id-token: write line can remain commented out).

🛑 Declining this workflow

This is an organization-enforced security-hardening workflow, so closing this PR is not enough — the tool treats a plain close as a discard and opens a fresh replacement PR on its next run.

To permanently decline this category, a maintainer must close this PR and add one of these labels to it:

Label Use when
remediation: not-required The category is already handled another way for this repo.
remediation: not-applicable The category genuinely does not apply (e.g. there is no manifest to scan).

Applying a label requires write, triage, or admin access, so the label is a trusted maintainer signal. Once a closed PR carries one of these labels, the tool respects the decline and will not reopen a replacement.

🔮 Type of Change

  • Standard

🔗 References

This change applies a standard automated security-scanning workflow as part of routine repository hardening.

  • I explained why this change is needed.

📖 Documentation

No user-facing changes have been introduced.

  • I reflected this change in the (internal and/or user-facing) documentation, or added an explanation for why no documentation update is needed.

🎯 Testing

⚠️ This workflow has not been tested in this repository. It must be validated before merging — confirm it triggers, runs, and passes without silently ignoring failures.

  • The added workflow has been run and verified green in this repository's CI (not merged on an untriggered/empty result).

🚀 Deployment

  • This change can support multiple releases of the code serving traffic at the same time.

🔥 Rollback

Reverting this PR removes the added workflow file — no further action required.

  • I explained what the rollback for this change will look like.

@nirmal-joishi-a0
nirmal-joishi-a0 requested a review from a team as a code owner September 30, 2026 14:05
@nirmal-joishi-a0

Copy link
Copy Markdown
Author

@auth0/project-dx-sdks-engineer-codeowner please review the files in the PR. This automated security-hardening workflow is untested in this repo — before merging, confirm it triggers and passes (and is not silently ignoring failures); do not merge on a green result alone.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant