Files
dependabot[bot]andGitHub 4cd1a9a619 deps(deps): bump actions/setup-python
Bumps the actions-minor-patch group with 1 update: [actions/setup-python](https://github.com/actions/setup-python).


Updates `actions/setup-python` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/5fda3b95a4ea91299a34e894583c3862153e4b97...6d4fd22b20465ccc0f7354476588e8df7c9ca0e0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-01 06:07:25 +00:00

140 lines
5.3 KiB
YAML

name: v2 audit
# Local-only by design: this workflow is wired up so the v2.0.0 audit
# pass is ready to fire the moment we authorize a push, but it never
# runs on a push or pull_request event. The two triggers are:
#
# - workflow_dispatch (manual button in the Actions UI)
# - workflow_call (so future workflows can chain it in)
#
# Until the v2 branch is pushed, this file lives on the branch but
# GitHub never schedules it. After we push, the maintainer triggers it
# manually from the Actions tab to gate the v2.0.0 tag.
on:
workflow_dispatch:
inputs:
reason:
description: "Why this audit run is happening (free text, goes to summary)"
required: false
default: "manual v2 audit"
workflow_call:
permissions:
contents: read
jobs:
manifest:
name: Manifest consistency (15 assertions)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python 3.11
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.11"
- name: Install pytest + test deps
run: pip install pytest beautifulsoup4
- name: Run manifest consistency tests
run: pytest tests/test_manifest_consistency.py -v
security:
name: SSRF + DNS rebinding suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python 3.11
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.11"
- name: Install runtime + test deps
run: |
pip install pytest
pip install -r requirements.txt
- name: Run url_safety regression battery
run: pytest tests/test_url_safety.py -v
- name: Confirm syntactic integrity of safety + renderer modules
run: |
python3 -m py_compile scripts/url_safety.py
python3 -m py_compile scripts/render_page.py
python3 -m py_compile scripts/fetch_page.py
python3 -m py_compile scripts/capture_screenshot.py
python3 -m py_compile scripts/google_auth.py
python3 -m py_compile scripts/backlinks_auth.py
full_pytest:
name: Full pytest suite
runs-on: ubuntu-latest
env:
# sync_flow tests need an authenticated gh CLI to bypass the
# 60/hr anonymous rate limit. Identical to ci.yml.
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python 3.11
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.11"
- name: Install pytest + test deps
# Must not be tolerated with `|| true`: several test modules import
# scripts that call sys.exit(1) at module scope when a dependency is
# missing, so a swallowed install failure resurfaces later as an opaque
# pytest INTERNALERROR instead of the pip error that caused it. Matches
# ci.yml, which installs the same set without a fallback.
run: |
pip install pytest beautifulsoup4
pip install -r requirements.txt
- name: Run pytest
run: pytest tests/ -v
secret_scan:
name: Secret scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Scan tracked files for leaked credentials
run: |
set -uo pipefail
# High-signal credential patterns. Test fixtures and documented
# placeholders are allowlisted; auth-setup.md ships a private-key
# placeholder (BEGIN PRIVATE KEY\n...) that is not a real key.
PATTERN='AIza[0-9A-Za-z_-]{35}|ghp_[A-Za-z0-9]{36}|github_pat_[A-Za-z0-9_]{40,}|gh[ous]_[A-Za-z0-9]{36}|AKIA[0-9A-Z]{16}|GOCSPX-[A-Za-z0-9_-]{20,}|sk-(proj-)?[A-Za-z0-9]{20,}|xox[baprs]-[A-Za-z0-9-]{10,}'
HITS=$(git ls-files -z \
| xargs -0 grep -nIEH "$PATTERN" 2>/dev/null \
| grep -vE 'DUMMY|EXAMPLE|YOUR_|REDACTED|placeholder|<[A-Z_]+>' \
| grep -vE '^tests/|/auth-setup\.md:' || true)
if [ -n "$HITS" ]; then
echo "::error::Potential leaked credentials in tracked files:"
echo "$HITS"
exit 1
fi
echo "Secret scan clean: no credentials detected in tracked files."
audit_summary:
name: Audit summary
runs-on: ubuntu-latest
needs: [manifest, security, full_pytest, secret_scan]
if: always()
steps:
- name: Emit summary
run: |
echo "## v2 audit summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- Reason: ${{ inputs.reason }}" >> $GITHUB_STEP_SUMMARY
echo "- Manifest: ${{ needs.manifest.result }}" >> $GITHUB_STEP_SUMMARY
echo "- Security: ${{ needs.security.result }}" >> $GITHUB_STEP_SUMMARY
echo "- Full pytest: ${{ needs.full_pytest.result }}" >> $GITHUB_STEP_SUMMARY
echo "- Secret scan: ${{ needs.secret_scan.result }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "All four must report 'success' before tagging." >> $GITHUB_STEP_SUMMARY