Skip to content

Commit d4f8340

Browse files
committed
Added GitHub security automation
- Added a public SECURITY.md with a private reporting workflow - Added CodeQL and dependency review workflows for main and pull requests - Added a pinned docs requirements manifest so dependency graph tooling has a supported dependency source
1 parent eef7489 commit d4f8340

File tree

5 files changed

+106
-2
lines changed

5 files changed

+106
-2
lines changed

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Code Scanning
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: '17 4 * * 1'
12+
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
18+
jobs:
19+
analyze:
20+
name: CodeQL (${{ matrix.language }})
21+
runs-on: ubuntu-22.04
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
language:
26+
- actions
27+
- cpp
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: recursive
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v3
37+
with:
38+
languages: ${{ matrix.language }}
39+
40+
- name: Install RISC-V cross toolchain
41+
if: matrix.language == 'cpp'
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf
45+
46+
- name: Build kernel for analysis
47+
if: matrix.language == 'cpp'
48+
run: |
49+
make clean
50+
make -j2
51+
52+
- name: Analyze
53+
uses: github/codeql-action/analyze@v3
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Dependency Review
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
12+
jobs:
13+
dependency-review:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Dependency Review
18+
uses: actions/dependency-review-action@v4

SECURITY.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
ThunderOS is currently maintained on the default branch and the latest release line.
6+
7+
| Version | Supported |
8+
|---------|-----------|
9+
| `main` | Yes |
10+
| Latest `v0.9.x` release | Yes |
11+
| Older tags and unmaintained branches | No |
12+
13+
## Reporting a Vulnerability
14+
15+
Use GitHub private vulnerability reporting for ThunderOS.
16+
17+
1. Open the repository security page.
18+
2. Choose `Report a vulnerability`.
19+
3. Include the affected commit, subsystem, reproduction steps, and impact.
20+
4. Do not open a public issue for security-sensitive bugs.
21+
22+
If the bug is not security-sensitive, use the normal issue tracker instead.
23+
24+
## What To Expect
25+
26+
- An acknowledgment within 5 business days.
27+
- A follow-up status update after triage.
28+
- Coordinated disclosure after a fix is available.
29+
30+
Reports that include a clear reproduction path, affected configuration, and expected impact are much easier to triage quickly.

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ The `riscv/` directory contains practical reference material for RISC-V architec
7171

7272
### Prerequisites
7373

74-
Install Sphinx and the RTD theme:
74+
Install the pinned documentation dependencies:
7575

7676
```bash
77-
pip install sphinx sphinx_rtd_theme
77+
pip install -r requirements.txt
7878
```
7979

8080
### Build HTML Documentation

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Sphinx==8.1.3
2+
sphinx-rtd-theme==3.0.2
3+
Pygments==2.19.2

0 commit comments

Comments
 (0)