Skip to content

Commit c921a33

Browse files
meysholdtona-agent
andcommitted
Simplify README setup: replace scanner configs with links to GitHub docs
Co-authored-by: Ona <no-reply@ona.com>
1 parent ef55fd7 commit c921a33

1 file changed

Lines changed: 7 additions & 130 deletions

File tree

README.md

Lines changed: 7 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -56,139 +56,16 @@ Both automations authenticate using the token from the git credential helper (`G
5656

5757
## Set up on your own repo
5858

59-
### 1. Enable Dependabot alerts
59+
### 1. Enable security scanning
6060

61-
Go to **Settings > Code security** and enable:
62-
- **Dependency graph** (on by default for public repos)
63-
- **Dependabot alerts**
61+
Set up scanners so that alerts appear under **Security** in your GitHub repo. This repo uses Dependabot, CodeQL, Trivy, and OSV-Scanner — see the [`.github/workflows/`](.github/workflows/) directory for examples. Use whichever combination fits your project.
6462

65-
### 2. Add the Maven dependency submission workflow
63+
GitHub docs:
64+
- [Dependabot alerts](https://docs.github.com/en/code-security/dependabot/dependabot-alerts/configuring-dependabot-alerts)
65+
- [Code scanning (CodeQL)](https://docs.github.com/en/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning)
66+
- [Third-party SARIF uploads](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github) (Trivy, OSV-Scanner, etc.)
6667

67-
For Maven projects using a parent BOM (e.g., Spring Boot), create `.github/workflows/dependency-submission.yml`:
68-
69-
```yaml
70-
name: Maven Dependency Submission
71-
72-
on:
73-
push:
74-
branches: [ "main" ]
75-
paths:
76-
- 'pom.xml'
77-
- '.mvn/**'
78-
workflow_dispatch:
79-
80-
permissions:
81-
contents: write
82-
83-
jobs:
84-
submit:
85-
runs-on: ubuntu-latest
86-
steps:
87-
- uses: actions/checkout@v4
88-
89-
- name: Set up JDK 17
90-
uses: actions/setup-java@v4
91-
with:
92-
java-version: '17'
93-
distribution: 'adopt'
94-
95-
- name: Submit dependency graph
96-
uses: advanced-security/maven-dependency-submission-action@v4
97-
```
98-
99-
This resolves the full dependency tree with actual versions so Dependabot can match against known CVEs.
100-
101-
### 3. Add Trivy filesystem scanning
102-
103-
Create `.github/workflows/trivy.yml`:
104-
105-
```yaml
106-
name: trivy
107-
108-
on:
109-
push:
110-
branches: [ "main" ]
111-
pull_request:
112-
branches: [ "main" ]
113-
schedule:
114-
- cron: '29 6 * * 2'
115-
116-
permissions:
117-
contents: read
118-
119-
jobs:
120-
fs-scan:
121-
permissions:
122-
contents: read
123-
security-events: write
124-
actions: read
125-
name: Filesystem Scan
126-
runs-on: ubuntu-latest
127-
steps:
128-
- uses: actions/checkout@v4
129-
130-
- name: Run Trivy filesystem scanner
131-
uses: aquasecurity/trivy-action@0.35.0
132-
with:
133-
scan-type: 'fs'
134-
scan-ref: '.'
135-
format: 'sarif'
136-
output: 'trivy-fs-results.sarif'
137-
severity: 'CRITICAL,HIGH'
138-
139-
- name: Upload results to GitHub Security tab
140-
uses: github/codeql-action/upload-sarif@v3
141-
if: always()
142-
with:
143-
sarif_file: 'trivy-fs-results.sarif'
144-
category: 'trivy-fs'
145-
```
146-
147-
### 4. Add OSV-Scanner
148-
149-
Create `.github/workflows/osv-scanner.yml`:
150-
151-
```yaml
152-
name: OSV-Scanner
153-
154-
on:
155-
pull_request:
156-
branches: [ "main" ]
157-
merge_group:
158-
branches: [ "main" ]
159-
schedule:
160-
- cron: '39 0 * * 4'
161-
push:
162-
branches: [ "main" ]
163-
164-
permissions:
165-
security-events: write
166-
contents: read
167-
actions: read
168-
169-
jobs:
170-
scan-scheduled:
171-
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
172-
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v2.0.0"
173-
with:
174-
fail-on-vuln: false
175-
scan-args: |-
176-
-r
177-
./
178-
scan-pr:
179-
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
180-
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@v2.0.0"
181-
with:
182-
scan-args: |-
183-
-r
184-
./
185-
```
186-
187-
### 5. Enable CodeQL (optional)
188-
189-
Go to **Settings > Code security > Code scanning** and click **Set up** for CodeQL. GitHub's default setup works for most repos. See [GitHub's CodeQL docs](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages) for advanced configuration.
190-
191-
### 6. Add Ona automations
68+
### 2. Add Ona automations
19269

19370
Copy the two automation files into your repo:
19471

0 commit comments

Comments
 (0)