Skip to content

V1.18.1#46

Merged
mfriesen merged 4 commits into
masterfrom
v1.18.1
Dec 24, 2025
Merged

V1.18.1#46
mfriesen merged 4 commits into
masterfrom
v1.18.1

Conversation

@mfriesen

Copy link
Copy Markdown
Member

No description provided.

@mfriesen mfriesen merged commit d46b06f into master Dec 24, 2025
3 of 5 checks passed
@mfriesen mfriesen deleted the v1.18.1 branch December 24, 2025 03:02
Comment on lines +16 to +30
name: Build FormKiQ API JWT
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --no-transfer-progress --file pom.xml

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 6 months ago

In general, the fix is to explicitly set permissions for the GITHUB_TOKEN either at the workflow root (applies to all jobs) or under the specific job. For this workflow, the job only checks out code and runs Maven, so it only needs read access to repository contents. We can therefore set contents: read as the least-privilege configuration.

The single best fix with no functional change is to add a permissions block at the workflow root (between on: and jobs:) that restricts the token to read-only contents. This ensures all current and future jobs in this workflow inherit safe defaults unless they override them. Concretely, in .github/workflows/maven.yml, after the on: block (lines 8–12) and before jobs: (line 14), insert:

permissions:
  contents: read

No imports or extra definitions are required; this is pure GitHub Actions YAML configuration.

Suggested changeset 1
.github/workflows/maven.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -11,6 +11,9 @@
   pull_request:
     branches: [ main, master ]
 
+permissions:
+  contents: read
+
 jobs:
   build:
     name: Build FormKiQ API JWT
EOF
@@ -11,6 +11,9 @@
pull_request:
branches: [ main, master ]

permissions:
contents: read

jobs:
build:
name: Build FormKiQ API JWT
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants