Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

ci: harden GitHub Actions supply chain (#472)

Shaan Majidb7e92d49c0be
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 094a4b96..eacaf25b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,14 +10,18 @@ permissions:
id-token: write
attestations: write
+
jobs:
build-and-release:
runs-on: ubuntu-latest
+ permissions:
+ contents: write
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
+ persist-credentials: false
- name: Build .skill artifact
run: |
@@ -30,9 +34,10 @@ jobs:
subject-path: dist/last30days.skill
- name: Create GitHub release
- uses: softprops/action-gh-release@v2
- with:
- files: dist/last30days.skill
- generate_release_notes: true
- draft: false
- prerelease: false
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ gh release create "${GITHUB_REF_NAME}" \
+ dist/last30days.skill \
+ --generate-notes \
+ --verify-tag
diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml
index 512ede51..2926f5e0 100644
--- a/.github/workflows/security.yml
+++ b/.github/workflows/security.yml
@@ -7,48 +7,42 @@ on:
- main
workflow_dispatch:
-permissions:
- contents: read
+permissions: {}
jobs:
dependency-audit:
name: Dependency audit
runs-on: ubuntu-latest
+ permissions:
+ contents: read
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
+ with:
+ persist-credentials: false
- name: Install uv
- uses: astral-sh/setup-uv@v5
-
- - name: Set up Python
- run: uv python install 3.12
-
- - name: Export locked dependency set
- run: |
- uv export \
- --locked \
- --all-groups \
- --no-hashes \
- --format requirements.txt \
- --output-file /tmp/last30days-requirements.txt
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
# Advisory-first: visibility before enforcement. This repo handles API keys,
# cookies, browser tokens, and local env files, so dependency CVEs should be
# visible in CI logs even before the project has a clean blocking baseline.
# Set continue-on-error: false once a clean baseline run is confirmed.
- - name: Run pip-audit against locked dependencies
+ - name: Run uv audit against locked dependencies
continue-on-error: true
- run: uvx --python 3.12 pip-audit -r /tmp/last30days-requirements.txt --progress-spinner=off
+ run: uv audit --locked
secret-scan:
name: Secret scan
runs-on: ubuntu-latest
+ permissions:
+ contents: read
steps:
- name: Checkout full history for diff-aware scanning
- uses: actions/checkout@v4
+ uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
+ persist-credentials: false
# Advisory-first: this reports verified secrets in pull requests and pushes to
# main, but does not block merges until maintainers confirm a clean baseline.
@@ -59,7 +53,7 @@ jobs:
# examples; use obvious dummy values and env-based auth patterns instead.
- name: Run TruffleHog OSS secret scan
if: github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
- uses: trufflesecurity/[email protected]
+ uses: trufflesecurity/trufflehog@17456f8c7d042d8c82c9a8ca9e937231f9f42e26 # v3.95.2
continue-on-error: true
with:
path: ./
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index e6f86df6..b3a18e7f 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -6,18 +6,21 @@ on:
branches:
- main
-permissions:
- contents: read
+permissions: {}
jobs:
tests:
runs-on: ubuntu-latest
+ permissions:
+ contents: read
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
+ with:
+ persist-credentials: false
- name: Install uv
- uses: astral-sh/setup-uv@v5
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
- name: Set up Python
run: uv python install 3.12
diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml
new file mode 100644
index 00000000..105f26c5
--- /dev/null
+++ b/.github/workflows/zizmor.yml
@@ -0,0 +1,23 @@
+name: GitHub Actions Security Analysis with zizmor 🌈
+
+on:
+ push:
+ branches: ["main"]
+ pull_request:
+ branches: ["**"]
+
+permissions: {}
+
+jobs:
+ zizmor:
+ runs-on: ubuntu-latest
+ permissions:
+ security-events: write
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ persist-credentials: false
+
+ - name: Run zizmor 🌈
+ uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6
diff --git a/tests/test_security_workflow.py b/tests/test_security_workflow.py
index d4feacc7..088548fb 100644
--- a/tests/test_security_workflow.py
+++ b/tests/test_security_workflow.py
@@ -20,7 +20,7 @@ def test_security_workflow_runs_dependency_audit_advisory_first() -> None:
text = _workflow_text()
assert "dependency-audit:" in text
- assert "pip-audit" in text
+ assert "uv audit --locked" in text
assert "continue-on-error: true" in text
assert "Set continue-on-error: false once a clean baseline run is confirmed" in text