Skip to content

Commit e123423

Browse files
loekensgardclaude
andcommitted
fix: harden GitHub Actions workflows and update dependabot config
- build_and_test.yaml: add explicit permissions (contents: read) - release.yaml: restrict permissions to empty (uses app token), add concurrency group - dependabot.yml: update schedule to first Monday of month, change nuget prefix to "fix:", add labels, separate minor/patch group Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8517a37 commit e123423

File tree

3 files changed

+33
-23
lines changed

3 files changed

+33
-23
lines changed

.github/dependabot.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5-
61
version: 2
72
updates:
8-
- package-ecosystem: "nuget" # See documentation for possible values
9-
directory: "/" # Location of package manifests
3+
# Check for updates to nuget packages
4+
- package-ecosystem: "nuget"
5+
directory: "/"
106
schedule:
11-
interval: "monthly"
12-
time: "09:00"
13-
timezone: "Europe/Oslo"
7+
interval: 'cron'
8+
cronjob: '0 8 * * MON#1'
9+
timezone: 'Europe/Oslo'
10+
labels:
11+
- "dependencies"
12+
- "nuget"
1413
commit-message:
15-
prefix: "build:"
14+
prefix: "fix:"
1615
groups:
17-
all:
16+
# Group all non-major updates together
17+
minor-patch-updates:
1818
patterns:
1919
- "*"
20+
update-types:
21+
- "minor"
22+
- "patch"
2023

24+
# Check for updates to GitHub Actions
2125
- package-ecosystem: "github-actions"
2226
directory: "/"
2327
schedule:
24-
interval: "monthly"
25-
time: "09:00"
26-
timezone: "Europe/Oslo"
28+
interval: 'cron'
29+
cronjob: '0 8 * * MON#1'
30+
timezone: 'Europe/Oslo'
31+
labels:
32+
- "dependencies"
33+
- "github-actions"
2734
commit-message:
2835
prefix: "ci:"
29-
groups:
30-
all:
31-
patterns:
32-
- "*"

.github/workflows/build_and_test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build-and-test:
1316
runs-on: ubuntu-latest

.github/workflows/release.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
branches:
66
- main
77

8-
permissions:
9-
contents: write
10-
pull-requests: write
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
# action uses an app-token
13+
# the built-in token doesn't need any permissions
14+
permissions: {}
1115

1216
jobs:
1317
release-please:
@@ -22,4 +26,4 @@ jobs:
2226
with:
2327
token: ${{ steps.app-token.outputs.token }}
2428
config-file: ".github/release-please-config.json"
25-
manifest-file: ".github/.release-please-manifest.json"
29+
manifest-file: ".github/.release-please-manifest.json"

0 commit comments

Comments
 (0)