Skip to content

Commit 2d28537

Browse files
committed
ci: add dependabot config and CodeQL workflow
Phase 1 W9 repo-hygiene task: enable continuous dependency scanning and static analysis. - .github/dependabot.yml: daily scans for pip (pyproject.toml) and github-actions ecosystems, grouped patch+minor updates, majors ignored for human review. - .github/workflows/codeql.yml: weekly + on-push/PR CodeQL analysis for python and actions languages with security-and-quality query suite. Private Vulnerability Disclosure repo setting is a GitHub UI toggle and is tracked as a manual checklist item in the implementation log.
1 parent 7a26a5a commit 2d28537

2 files changed

Lines changed: 84 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
open-pull-requests-limit: 10
8+
labels:
9+
- "dependencies"
10+
- "security"
11+
groups:
12+
python-patch-and-minor:
13+
update-types:
14+
- "patch"
15+
- "minor"
16+
ignore:
17+
- dependency-name: "*"
18+
update-types:
19+
- "version-update:semver-major"
20+
21+
- package-ecosystem: "github-actions"
22+
directory: "/"
23+
schedule:
24+
interval: "daily"
25+
open-pull-requests-limit: 5
26+
labels:
27+
- "dependencies"
28+
- "ci"
29+
groups:
30+
actions-patch-and-minor:
31+
update-types:
32+
- "patch"
33+
- "minor"

.github/workflows/codeql.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: "32 7 * * 1"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 360
16+
permissions:
17+
security-events: write
18+
packages: read
19+
actions: read
20+
contents: read
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- language: python
27+
build-mode: none
28+
- language: actions
29+
build-mode: none
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python
36+
if: matrix.language == 'python'
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: "3.10"
40+
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v3
43+
with:
44+
languages: ${{ matrix.language }}
45+
build-mode: ${{ matrix.build-mode }}
46+
queries: security-and-quality
47+
48+
- name: Perform CodeQL Analysis
49+
uses: github/codeql-action/analyze@v3
50+
with:
51+
category: "/language:${{ matrix.language }}"

0 commit comments

Comments
 (0)