Skip to content

Commit 3256246

Browse files
authored
chore: improve OpenSSF Scorecard (Signed-Releases, Vulnerabilities, Branch-Protection) (#146)
chore(scorecard): improve OpenSSF Scorecard score - Fix Signed-Releases (0 -> 10 expected): download GitHub attestation bundle after attest-build-provenance and upload as patchloom.vsix.intoto.jsonl release asset. Scorecard requires release assets (not just API attestations). See ci-build-release skill. - Bump undici (via vsce/cheerio) via npm audit fix to clear 7 high vulns (Vulnerabilities 3 -> 10). - Updated main-branch-protection ruleset (via API) to set require_last_push_approval: true (helps Branch-Protection from 5). - package-lock.json updated for dep fix. These target the main actionable low scores (Signed-Releases, Vulnerabilities, Branch-Protection). Maintained is time-based; Packaging may be VS Code specific; CII Gold blocked by bus factor. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent 0629af9 commit 3256246

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,28 @@ jobs:
6767
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
6868
with:
6969
subject-path: patchloom.vsix
70+
- name: Upload attestation bundle as .intoto.jsonl (for Scorecard Signed-Releases)
71+
# Scorecard's Signed-Releases check requires .intoto.jsonl *release assets* (not just API attestations).
72+
# See ~/.grok/skills/ci-build-release/SKILL.md
73+
env:
74+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
run: |
76+
mkdir -p attestation-bundles
77+
tmpdir=$(mktemp -d)
78+
pushd "$tmpdir" > /dev/null
79+
if gh attestation download "$OLDPWD/patchloom.vsix" \
80+
--repo "${{ github.repository }}" 2>/dev/null; then
81+
for bundle in *.jsonl; do
82+
[ -f "$bundle" ] || continue
83+
cp "$bundle" "$OLDPWD/attestation-bundles/patchloom.vsix.intoto.jsonl"
84+
break
85+
done
86+
fi
87+
popd > /dev/null
88+
rm -rf "$tmpdir"
89+
if ls attestation-bundles/*.intoto.jsonl >/dev/null 2>&1; then
90+
gh release upload "${{ needs.release-please.outputs.tag_name }}" attestation-bundles/*.intoto.jsonl --clobber
91+
fi
7092
- name: Upload .vsix to GitHub Release
7193
env:
7294
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)