Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 30 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
#
# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)

name: Java CI with Maven

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
build:
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
Comment on lines +16 to +30

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.
9 changes: 9 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ docs/AddWorkflowStepDecision.md
docs/AddWorkflowStepQueue.md
docs/AdvancedDocumentSearchApi.md
docs/ApiKey.md
docs/ApiKeyPermission.md
docs/Attribute.md
docs/AttributeDataType.md
docs/AttributeSchemaCompositeKey.md
Expand Down Expand Up @@ -154,6 +155,8 @@ docs/DocumentActionType.md
docs/DocumentActionsApi.md
docs/DocumentAttribute.md
docs/DocumentAttributesApi.md
docs/DocumentConfig.md
docs/DocumentConfigContentTypes.md
docs/DocumentDataClassificationApi.md
docs/DocumentFoldersApi.md
docs/DocumentFulltextAttribute.md
Expand Down Expand Up @@ -641,6 +644,7 @@ src/main/java/com/formkiq/client/model/AddWorkflowStep.java
src/main/java/com/formkiq/client/model/AddWorkflowStepDecision.java
src/main/java/com/formkiq/client/model/AddWorkflowStepQueue.java
src/main/java/com/formkiq/client/model/ApiKey.java
src/main/java/com/formkiq/client/model/ApiKeyPermission.java
src/main/java/com/formkiq/client/model/Attribute.java
src/main/java/com/formkiq/client/model/AttributeDataType.java
src/main/java/com/formkiq/client/model/AttributeSchemaCompositeKey.java
Expand Down Expand Up @@ -676,6 +680,8 @@ src/main/java/com/formkiq/client/model/DocumentAction.java
src/main/java/com/formkiq/client/model/DocumentActionStatus.java
src/main/java/com/formkiq/client/model/DocumentActionType.java
src/main/java/com/formkiq/client/model/DocumentAttribute.java
src/main/java/com/formkiq/client/model/DocumentConfig.java
src/main/java/com/formkiq/client/model/DocumentConfigContentTypes.java
src/main/java/com/formkiq/client/model/DocumentFulltextAttribute.java
src/main/java/com/formkiq/client/model/DocumentFulltextAttributeEq.java
src/main/java/com/formkiq/client/model/DocumentFulltextRequest.java
Expand Down Expand Up @@ -1105,6 +1111,7 @@ src/test/java/com/formkiq/client/model/AddWorkflowResponseTest.java
src/test/java/com/formkiq/client/model/AddWorkflowStepDecisionTest.java
src/test/java/com/formkiq/client/model/AddWorkflowStepQueueTest.java
src/test/java/com/formkiq/client/model/AddWorkflowStepTest.java
src/test/java/com/formkiq/client/model/ApiKeyPermissionTest.java
src/test/java/com/formkiq/client/model/ApiKeyTest.java
src/test/java/com/formkiq/client/model/AttributeDataTypeTest.java
src/test/java/com/formkiq/client/model/AttributeSchemaCompositeKeyTest.java
Expand Down Expand Up @@ -1140,6 +1147,8 @@ src/test/java/com/formkiq/client/model/DocumentActionStatusTest.java
src/test/java/com/formkiq/client/model/DocumentActionTest.java
src/test/java/com/formkiq/client/model/DocumentActionTypeTest.java
src/test/java/com/formkiq/client/model/DocumentAttributeTest.java
src/test/java/com/formkiq/client/model/DocumentConfigContentTypesTest.java
src/test/java/com/formkiq/client/model/DocumentConfigTest.java
src/test/java/com/formkiq/client/model/DocumentFulltextAttributeEqTest.java
src/test/java/com/formkiq/client/model/DocumentFulltextAttributeTest.java
src/test/java/com/formkiq/client/model/DocumentFulltextRequestTest.java
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This is the official supported Java library for the FormKiQ API.

FormKiQ HTTP API

- API version: 1.18.0
- Build date: 2025-11-01T15:09:25.429667-05:00[America/Winnipeg]
- API version: 1.18.1
- Build date: 2025-12-07T17:20:11.660615-06:00[America/Winnipeg]
- Generator version: 7.17.0

Formkiq API: Document Management Platform API using OAuth(JWT) Authentication
Expand Down Expand Up @@ -64,7 +64,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.formkiq</groupId>
<artifactId>client</artifactId>
<version>1.18.0</version>
<version>1.18.1</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -80,7 +80,7 @@ Add this dependency to your project's build file:
}

dependencies {
implementation "com.formkiq:client:1.18.0"
implementation "com.formkiq:client:1.18.1"
}
```

Expand All @@ -94,7 +94,7 @@ mvn clean package

Then manually install the following JARs:

* `target/client-1.18.0.jar`
* `target/client-1.18.1.jar`
* `target/lib/*.jar`

## Getting Started
Expand Down Expand Up @@ -513,6 +513,7 @@ Class | Method | HTTP request | Description
- [AddWorkflowStepDecision](docs/AddWorkflowStepDecision.md)
- [AddWorkflowStepQueue](docs/AddWorkflowStepQueue.md)
- [ApiKey](docs/ApiKey.md)
- [ApiKeyPermission](docs/ApiKeyPermission.md)
- [Attribute](docs/Attribute.md)
- [AttributeDataType](docs/AttributeDataType.md)
- [AttributeSchemaCompositeKey](docs/AttributeSchemaCompositeKey.md)
Expand Down Expand Up @@ -548,6 +549,8 @@ Class | Method | HTTP request | Description
- [DocumentActionStatus](docs/DocumentActionStatus.md)
- [DocumentActionType](docs/DocumentActionType.md)
- [DocumentAttribute](docs/DocumentAttribute.md)
- [DocumentConfig](docs/DocumentConfig.md)
- [DocumentConfigContentTypes](docs/DocumentConfigContentTypes.md)
- [DocumentFulltextAttribute](docs/DocumentFulltextAttribute.md)
- [DocumentFulltextAttributeEq](docs/DocumentFulltextAttributeEq.md)
- [DocumentFulltextRequest](docs/DocumentFulltextRequest.md)
Expand Down
Loading
Loading