Skip to content

Commit ea9b2c5

Browse files
koji-takao-spclaude
andcommitted
Add security scanning and Dependabot configuration
- Add security.yml workflow with Brakeman (SAST) and Bundle Audit - Add dependabot.yml for automated dependency updates - Schedule weekly security scans on Mondays - Group dependency updates by type (development/production) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4a10213 commit ea9b2c5

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "bundler"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
open-pull-requests-limit: 10
9+
groups:
10+
development-dependencies:
11+
dependency-type: "development"
12+
production-dependencies:
13+
dependency-type: "production"
14+
commit-message:
15+
prefix: "deps"
16+
labels:
17+
- "dependencies"
18+
19+
- package-ecosystem: "github-actions"
20+
directory: "/"
21+
schedule:
22+
interval: "weekly"
23+
day: "monday"
24+
commit-message:
25+
prefix: "ci"
26+
labels:
27+
- "ci"

.github/workflows/security.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Security
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: ['**']
8+
schedule:
9+
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC
10+
11+
jobs:
12+
brakeman:
13+
name: Brakeman (Static Analysis)
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Ruby
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: '3.3'
21+
- name: Install Brakeman
22+
run: gem install brakeman
23+
- name: Run Brakeman
24+
run: brakeman --no-pager -w2 --skip-files test/
25+
26+
bundle-audit:
27+
name: Bundle Audit (Dependency Check)
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Set up Ruby
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: '3.3'
35+
- name: Install dependencies
36+
run: bundle install --jobs 4 --retry 3
37+
- name: Install bundle-audit
38+
run: gem install bundler-audit
39+
- name: Update vulnerability database
40+
run: bundle-audit update
41+
- name: Run bundle-audit
42+
run: bundle-audit check

0 commit comments

Comments
 (0)