Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work.
Python agent-skillsai-agentsbook-to-skillcontext-engineeringdocument-processingedtechknowledge-baseknowledge-managementllmpdf-to-markdownragself-studystudy-tools
ci(security): add CodeQL, Bandit, Zizmor scanning + Dependabot (#37)
Virgilio Junior634c1cf3a4b2
diff --git a/.github/dependabot.yml b/.github/dependabot.ymlnew file mode 100644index 0000000..bcec43b--- /dev/null+++ b/.github/dependabot.yml@@ -0,0 +1,9 @@+version: 2+updates:+ # Keep GitHub Actions fresh (and enables pinning actions to SHAs later).+ - package-ecosystem: github-actions+ directory: "/"+ schedule:+ interval: weekly+ commit-message:+ prefix: cidiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 501d3ca..831d0cc 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -61,6 +61,29 @@ jobs:test -f "$BOOK_SKILL_WORKDIR/metadata.json"grep -q "Backpressure" "$BOOK_SKILL_WORKDIR/full_text.txt"+ security:+ name: security (bandit + zizmor)+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ - uses: actions/setup-python@v5+ with:+ python-version: "3.12"+ - name: Install scanners+ run: pip install bandit zizmor+ - name: Bandit — gate on HIGH severity+ # Hard gate: only HIGH-severity / MEDIUM-confidence findings fail CI, to+ # avoid blocking on the known-acceptable subprocess (pip install) calls.+ # Ratchet down to medium once the open B314 docx-XML finding is hardened.+ run: bandit -q -r scripts tools --severity-level high --confidence-level medium+ - name: Bandit — report MEDIUM+ (informational)+ run: bandit -q -r scripts tools -ll || true+ - name: Zizmor — workflow audit (informational)+ # Surfaces GitHub Actions risks (injection, pull_request_target misuse).+ # Currently only flags unpinned-uses (tags vs SHA) — non-blocking until+ # the actions are pinned to SHAs (Dependabot follow-up).+ run: zizmor .github/workflows/ || true+validate-skill:name: validate SKILL.md (Claude Code rules)runs-on: ubuntu-latestdiff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.ymlnew file mode 100644index 0000000..5375cdc--- /dev/null+++ b/.github/workflows/codeql.yml@@ -0,0 +1,30 @@+name: CodeQL++on:+ push:+ branches: [master]+ pull_request:+ branches: [master]+ schedule:+ # Weekly scan so newly-disclosed query packs catch latent issues.+ - cron: "27 4 * * 1"++permissions:+ contents: read+ security-events: write++jobs:+ analyze:+ name: analyze (python)+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ - name: Initialize CodeQL+ uses: github/codeql-action/init@v3+ with:+ languages: python+ queries: security-and-quality+ - name: Perform CodeQL analysis+ uses: github/codeql-action/analyze@v3+ with:+ category: "/language:python"diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9ec0525..6758f35 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]+### Security+- **CI security scanning** — added CodeQL (Python, security-and-quality + weekly+ schedule), Bandit (gates on HIGH severity; reports MEDIUM+ informationally), and+ Zizmor (GitHub Actions workflow audit, informational). Added a Dependabot config+ for the `github-actions` ecosystem. Known open finding to harden in a follow-up:+ Bandit B314 (`xml.etree.ElementTree.fromstring` in the DOCX parser — untrusted+ XML).+### Fixed- **Package now imports on interpreters that evaluate annotations eagerly.**Added `from __future__ import annotations` to every module using PEP 604