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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/continuous-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v1
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e #v1.2.0

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a #v4.3.1
with:
role-to-assume: ${{ secrets.AWS_INTEG_TEST_ROLE_ARN }}
aws-region: us-east-1

- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde #v1.4.4
with:
java-version: 11

- name: Cache Gradle Wrapper
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/wrapper
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/master-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ jobs:
coverage: true
steps:
- name: Checkout Repository
uses: actions/checkout@v1
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e #v1.2.0

- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde #v1.4.4
with:
java-version: ${{ matrix.java }}

- name: Cache Gradle Modules
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/caches
key: gradle-caches-${{ hashFiles('**/*.gradle.kts') }}

- name: Cache Gradle Wrapper
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/wrapper
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
Expand All @@ -50,12 +50,12 @@ jobs:
env:
CI: true

- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 #v1.5.2
if: ${{ matrix.coverage }}
with:
files: ./jacoco/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
if: ${{ matrix.coverage }}
with:
name: coverage-report
Expand All @@ -67,18 +67,18 @@ jobs:
needs: build
steps:
- name: Checkout Repository
uses: actions/checkout@v1
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e #v1.2.0
- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde #v1.4.4
with:
java-version: 11
- name: Cache Gradle Modules
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/caches
key: gradle-caches-${{ hashFiles('**/*.gradle.kts') }}
- name: Cache Gradle Wrapper
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/wrapper
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
Expand Down
37 changes: 31 additions & 6 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
coverage: true
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 #v2.7.0

- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde #v1.4.4
with:
java-version: ${{ matrix.java }}

- name: Cache Gradle Modules
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/caches
key: gradle-caches-${{ hashFiles('**/*.gradle.kts') }}

- name: Cache Gradle Wrapper
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/wrapper
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
Expand All @@ -51,13 +51,38 @@
env:
CI: true

- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 #v1.5.2
if: ${{ matrix.coverage }}
with:
files: ./jacoco/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
if: ${{ matrix.coverage }}
with:
name: coverage-report
path: jacoco/build/reports/jacoco/codeCoverageReport/html

static-code-checks:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
with:
fetch-depth: 0
- name: Check for versioned GitHub actions
if: always()
run: |
# Get changed GitHub workflow/action files
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}..HEAD | grep -E "^\.github/(workflows|actions)/.*\.ya?ml$" || true)

if [ -n "$CHANGED_FILES" ]; then
# Check for any versioned actions, excluding comments and this validation script
VIOLATIONS=$(grep -Hn "uses:.*@v" $CHANGED_FILES | grep -v "grep.*uses:.*@v" | grep -v "#.*@v" || true)
if [ -n "$VIOLATIONS" ]; then
echo "Found versioned GitHub actions. Use commit SHAs instead:"
echo "$VIOLATIONS"
exit 1
fi
fi

echo "No versioned actions found in changed files"
Comment on lines +66 to +88

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 about 20 hours ago

  • In general, the fix is to explicitly specify a permissions block at the job or workflow level, restricting the GITHUB_TOKEN to only what the job needs, typically contents: read for read-only workflows.
  • For this workflow, the static-code-checks job only needs to check out code and run git/grep locally. It does not push changes, create releases, or modify issues/PRs. So we should add permissions: contents: read to that job. This mirrors the existing restriction already present on the build job (lines 10–11).
  • Concretely, in .github/workflows/pr-build.yml, under jobs: static-code-checks:, add a permissions: block at the same indentation level as runs-on. For example, between lines 65 and 66, insert:
    permissions:
      contents: read
  • No extra imports or methods are required; this is purely a YAML configuration change within the workflow.
Suggested changeset 1
.github/workflows/pr-build.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/pr-build.yml b/.github/workflows/pr-build.yml
--- a/.github/workflows/pr-build.yml
+++ b/.github/workflows/pr-build.yml
@@ -63,6 +63,8 @@
           path: jacoco/build/reports/jacoco/codeCoverageReport/html
 
   static-code-checks:
+    permissions:
+      contents: read
     runs-on: ubuntu-latest
     steps:
 
EOF
@@ -63,6 +63,8 @@
path: jacoco/build/reports/jacoco/codeCoverageReport/html

static-code-checks:
permissions:
contents: read
runs-on: ubuntu-latest
steps:

Copilot is powered by AI and may make mistakes. Always verify output.
10 changes: 5 additions & 5 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 #v2.7.0
- uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde #v1.4.4
with:
java-version: 11
- name: Cache Gradle Modules
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/caches
key: gradle-caches-${{ hashFiles('**/*.gradle.kts') }}
- name: Cache Gradle Wrapper
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 #v4.3.0
with:
path: ~/.gradle/wrapper
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e #v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
Loading