Skip to content

Fix Scorecard#261

Open
JosephDenman wants to merge 3 commits intomainfrom
JosephDenman/fix-scorecard
Open

Fix Scorecard#261
JosephDenman wants to merge 3 commits intomainfrom
JosephDenman/fix-scorecard

Conversation

@JosephDenman
Copy link
Copy Markdown
Contributor

@JosephDenman JosephDenman commented Mar 25, 2026

Motivation

PR #236 (Improve README and CONTRIBUTING) has been blocked from merging because the Scorecard code scanning check fails with three findings:

  • Vulnerabilities: 13 known vulnerabilities in dependencies
  • SAST: no static analysis tool detected
  • Fuzzing: no fuzzing/property-based testing detected

These are repo-wide issues, not specific to that PR. This PR fixes them so that #236 (and future PRs) can merge cleanly.

Summary

  • Harden all 24 GitHub Actions workflows to follow the principle of least privilege: top-level permissions: {} everywhere, with only the minimum grants each job actually needs
  • Pin the remaining unpinned action references (actions/cache, actions/setup-python) to commit SHAs
  • Add a CodeQL workflow for SAST coverage (Scorecard was flagging its absence)
  • Add a fast-check property-based test for VLQ encode/decode roundtrips (Scorecard Fuzzing check)
  • Migrate inline test reporting out of compatibility-test, release-test, and several other workflows into the centralized publish-test-results.yml via artifact uploads — same pattern we already use for compiler-extracted and build-vscplugin
  • Update scan.yml to use the latest version of upload-sarif-github-action, which lets us configure which Scorecard checks run. I exclude Token-Permissions because it false-positives on release workflows that legitimately need contents: write to create GitHub releases and push tags
  • Run cargo update and yarn upgrade to clear known vulnerabilities flagged by Scorecard's Vulnerabilities check

Notes

  • The two release workflows (internal-release.yml, public-release.yml) still declare contents: write on their release-creation jobs. This is unavoidable — they need it to push tags and create releases. Excluding the Token-Permissions Scorecard check is the correct fix here since the permission is already scoped to the minimum (single job, manual-trigger-only workflows).
  • A few vulnerability findings remain that we can't resolve without major version bumps or waiting on upstream: jsonwebtoken (blocked by octocrab), number_prefix (unmaintained transitive dep from cargo-nextest), and serialize-javascript/diff (locked by mocha).

@JosephDenman JosephDenman self-assigned this Mar 25, 2026
@JosephDenman JosephDenman requested review from a team as code owners March 25, 2026 16:51
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

Plugin Test Summary

 1 files   3 suites   1s ⏱️
21 tests 21 ✅ 0 💤 0 ❌
23 runs  23 ✅ 0 💤 0 ❌

Results for commit 3c50812.

♻️ This comment has been updated with latest results.

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

if: ${{ always() && github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
permissions:
contents: write

Check failure

Code scanning / Scorecard

Token-Permissions

score is 0: jobLevel 'contents' permission set to 'write' Remediation tip: Visit [https://app.stepsecurity.io/secureworkflow](https://app.stepsecurity.io/secureworkflow/file://./internal-release.yml/unknown?enable=permissions). Tick the 'Restrict permissions for GITHUB_TOKEN' Untick other options NOTE: If you want to resolve multiple issues at once, you can visit [https://app.stepsecurity.io/securerepo](https://app.stepsecurity.io/securerepo) instead. Click Remediation section below for further remediation help
name: Copy internal release to public repo
runs-on: ubuntu-latest
permissions:
contents: write

Check failure

Code scanning / Scorecard

Token-Permissions

score is 0: jobLevel 'contents' permission set to 'write' Remediation tip: Visit [https://app.stepsecurity.io/secureworkflow](https://app.stepsecurity.io/secureworkflow/file://./public-release.yml/unknown?enable=permissions). Tick the 'Restrict permissions for GITHUB_TOKEN' Untick other options NOTE: If you want to resolve multiple issues at once, you can visit [https://app.stepsecurity.io/securerepo](https://app.stepsecurity.io/securerepo) instead. Click Remediation section below for further remediation help
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

Compactc E2E Test Summary

2 825 tests   2 825 ✅  5m 49s ⏱️
    1 suites      0 💤
    1 files        0 ❌

Results for commit 3c50812.

♻️ This comment has been updated with latest results.

@JosephDenman JosephDenman force-pushed the JosephDenman/fix-scorecard branch from aeaa6a9 to 0d3d539 Compare March 26, 2026 17:30
Signed-off-by: JosephDenman <joseph.denman@iohk.io>
Signed-off-by: JosephDenman <joseph.denman@iohk.io>
@JosephDenman JosephDenman force-pushed the JosephDenman/fix-scorecard branch from 0d3d539 to 1d17956 Compare March 26, 2026 17:31
Signed-off-by: JosephDenman <joseph.denman@iohk.io>
@JosephDenman JosephDenman force-pushed the JosephDenman/fix-scorecard branch from 1d17956 to 3c50812 Compare March 26, 2026 17:34
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