Skip to content

Commit 6786989

Browse files
committed
ci: harden GitHub Actions supply-chain and repo security
Supply-chain (H3): - Pin actions/checkout to SHA 34e11487 (v4.3.1) in all three workflows - Pin github/codeql-action/init and /analyze to SHA 5c8a8a64 (v3.35.1) Dependency scanning (H2): - Add .github/dependabot.yml — weekly updates for github-actions and composer ecosystems; will open PRs to bump pinned SHAs automatically CodeQL SAST (M4): - Add .github/workflows/codeql.yml — PHP analysis with security-extended query suite on push/PR to main and weekly schedule Release gate (M1): - Add 'release' environment to release.yml job; environment configured with required reviewer (geekmuse) via GitHub API so every tag-triggered release requires manual approval before the job runs Security policy (M3): - Add SECURITY.md with supported versions, private disclosure email, and response SLA
1 parent 1f098f2 commit 6786989

5 files changed

Lines changed: 89 additions & 2 deletions

File tree

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
3+
updates:
4+
# Keep GitHub Actions pinned SHAs up to date.
5+
# Dependabot will open PRs to bump the SHA comments and the hash itself
6+
# whenever a new release of a used action is published.
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
day: "monday"
12+
commit-message:
13+
prefix: "chore(ci)"
14+
15+
# Keep Composer dev dependencies (phpunit, phpstan) up to date.
16+
- package-ecosystem: "composer"
17+
directory: "/"
18+
schedule:
19+
interval: "weekly"
20+
day: "monday"
21+
commit-message:
22+
prefix: "chore(deps)"

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1818

1919
# Stage 1 — PHP syntax check
2020
# Uses kanboard/kanboard image with entrypoint override (default entrypoint

.github/workflows/codeql.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
# Weekly scan every Monday at 03:00 UTC, independent of push activity.
12+
- cron: '0 3 * * 1'
13+
14+
jobs:
15+
analyze:
16+
name: Analyze (PHP)
17+
runs-on: ubuntu-latest
18+
permissions:
19+
security-events: write
20+
contents: read
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
25+
26+
- name: Initialize CodeQL
27+
uses: github/codeql-action/init@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3.35.1
28+
with:
29+
languages: php
30+
# Use the security-extended suite for broader PHP vulnerability coverage
31+
# (SQL injection, path traversal, XSS, SSRF, etc.)
32+
queries: security-extended
33+
34+
- name: Perform CodeQL Analysis
35+
uses: github/codeql-action/analyze@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3.35.1
36+
with:
37+
category: "/language:php"

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ on:
99
jobs:
1010
release:
1111
runs-on: ubuntu-latest
12+
environment: release
1213
permissions:
1314
contents: write
1415

1516
steps:
1617
- name: Checkout code
17-
uses: actions/checkout@v4
18+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1819

1920
- name: Extract version from tag
2021
id: version

SECURITY.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
|---------|-----------|
7+
| 0.2.x | ✅ Yes |
8+
| < 0.2 | ❌ No |
9+
10+
## Reporting a Vulnerability
11+
12+
**Please do not report security vulnerabilities through public GitHub issues.**
13+
14+
To report a vulnerability, email:
15+
**oss-projects+kanboard@bradleyscampbell.net**
16+
17+
Include as much detail as possible:
18+
- Plugin version affected
19+
- Kanboard version and PHP version
20+
- Description of the vulnerability and potential impact
21+
- Steps to reproduce (proof-of-concept if available)
22+
23+
You can expect an acknowledgement within **72 hours** and a resolution
24+
or status update within **14 days**.
25+
26+
If a fix is warranted, a patched release will be published and the reporter
27+
credited in the `CHANGELOG.md` (unless anonymity is requested).

0 commit comments

Comments
 (0)