Skip to content

Commit dc19084

Browse files
ci: add security workflows (CodeQL, Scorecard, Dependabot) (#81)
1 parent 517e2c7 commit dc19084

4 files changed

Lines changed: 107 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Default owners for all files
2+
* @agentrust-io/maintainers
3+
4+
# CI/CD workflow changes
5+
.github/workflows/ @agentrust-io/maintainers

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
open-pull-requests-limit: 5
9+
ignore:
10+
- dependency-name: "*"
11+
update-types:
12+
- "version-update:semver-major"
13+
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
day: "monday"
19+
open-pull-requests-limit: 5

.github/workflows/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: '15 3 * * 0'
12+
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
18+
env:
19+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
20+
21+
jobs:
22+
analyze:
23+
name: Analyze (python)
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v7
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v4
32+
with:
33+
languages: python
34+
queries: +security-extended
35+
36+
- name: Autobuild
37+
uses: github/codeql-action/autobuild@v4
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v4
41+
continue-on-error: true
42+
with:
43+
category: /language:python

.github/workflows/scorecard.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: OpenSSF Scorecard
2+
3+
on:
4+
branch_protection_rule:
5+
schedule:
6+
- cron: '30 4 * * 1'
7+
push:
8+
branches:
9+
- main
10+
11+
permissions: read-all
12+
13+
jobs:
14+
scorecard:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
security-events: write
18+
id-token: write
19+
contents: read
20+
actions: read
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v7
24+
with:
25+
persist-credentials: false
26+
fetch-depth: 0
27+
28+
- name: Run Scorecard
29+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
30+
with:
31+
results_file: scorecard-results.sarif
32+
results_format: sarif
33+
# publish_results requires a public repo; flip to true after the
34+
# 2026-06-23 public launch.
35+
publish_results: false
36+
37+
- name: Upload SARIF
38+
uses: github/codeql-action/upload-sarif@v4
39+
with:
40+
sarif_file: scorecard-results.sarif

0 commit comments

Comments
 (0)