Skip to content

V1.18.2#47

Merged
mfriesen merged 7 commits intomasterfrom
v1.18.2
Mar 19, 2026
Merged

V1.18.2#47
mfriesen merged 7 commits intomasterfrom
v1.18.2

Conversation

@mfriesen
Copy link
Copy Markdown
Member

No description provided.

@mfriesen mfriesen merged commit a8326c7 into master Mar 19, 2026
3 of 5 checks passed
@mfriesen mfriesen deleted the v1.18.2 branch March 19, 2026 23:30
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 14 days ago

Generally, the fix is to explicitly define a permissions block in the workflow, granting only the minimal scopes required. For a build-only Maven workflow that simply checks out code and compiles/tests it, contents: read is usually sufficient, and it can be set at the workflow root so it applies to all jobs.

The best targeted fix here is to add a workflow-level permissions section directly under the name: Java CI with Maven line (around line 6), with contents: read. This documents that the workflow only needs read access to repository contents and ensures that even if repository defaults are read-write, this workflow will not receive write permissions. No other functionality or steps need changing, and no imports or additional methods are required.

Concretely: edit .github/workflows/maven.yml to insert:

permissions:
  contents: read

between the existing name: and on: keys. No other files need modification.

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
@@ -4,6 +4,8 @@
 # This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)
 
 name: Java CI with Maven
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -4,6 +4,8 @@
# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)

name: Java CI with Maven
permissions:
contents: read

on:
push:
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