Skip to content

Commit 29f3293

Browse files
chore: Write perms should be as tightly scoped as possible. (#107)
* Add a dependabot file to keep deps up to date Signed-off-by: Justin Abrahms <[email protected]> * Move write permissions to the specific job, rather than globally Signed-off-by: Justin Abrahms <[email protected]> * Run code scanning (slow auto-build) weekly Signed-off-by: Justin Abrahms <[email protected]> Signed-off-by: Justin Abrahms <[email protected]>
1 parent 6eeeddd commit 29f3293

File tree

4 files changed

+59
-2
lines changed

4 files changed

+59
-2
lines changed

.github/dependabot.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
4+
# Maintain dependencies for GitHub Actions
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
10+
# Maintain dependencies for npm
11+
- package-ecosystem: "maven"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"

.github/workflows/merge.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ on:
1212
branches: [ master, main ]
1313

1414
permissions:
15-
packages: write
1615
contents: read
1716

1817
jobs:
1918
build:
2019

2120
runs-on: ubuntu-latest
21+
permissions:
22+
packages: write
2223

2324
steps:
2425
- uses: actions/checkout@v3

.github/workflows/pullrequest.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
pull_request:
44
branches: [ master, main ]
55
permissions:
6-
packages: write
76
contents: read
87

98
jobs:
@@ -15,6 +14,8 @@ jobs:
1514
ports:
1615
- 8013:8013
1716

17+
permissions:
18+
packages: write
1819
steps:
1920
- name: Check out the code
2021
uses: actions/checkout@v3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Code Scanning - Action"
2+
3+
# Docs for this at https://github.com/github/codeql-action#usage
4+
5+
on:
6+
schedule:
7+
# ┌───────────── minute (0 - 59)
8+
# │ ┌───────────── hour (0 - 23)
9+
# │ │ ┌───────────── day of the month (1 - 31)
10+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
11+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
12+
# │ │ │ │ │
13+
# │ │ │ │ │
14+
# │ │ │ │ │
15+
# * * * * *
16+
- cron: '30 1 * * 1'
17+
18+
jobs:
19+
CodeQL-Build:
20+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
21+
runs-on: ubuntu-latest
22+
23+
permissions:
24+
# required for all workflows
25+
security-events: write
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v3
30+
31+
# Initializes the CodeQL tools for scanning.
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@v2
34+
with:
35+
languages: java
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v2
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)