diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 82760e5..486c050 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -9,18 +9,25 @@ on: pull_request: branches: [ master, develop ] +permissions: {} + jobs: build: - runs-on: ubuntu-latest + permissions: + contents: read + # Required for setup-java Maven cache (restore/save); omitted token defaults no longer include this. + actions: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: maven - name: Build with Maven run: mvn -B package --file pom.xml diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..b6bcc96 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,31 @@ +# Static analysis for GitHub Actions workflow security and configuration issues. +# See https://docs.zizmor.sh/ + +name: zizmor + +on: + push: + branches: [ develop ] + pull_request: + branches: [ master, develop ] + +permissions: {} + +jobs: + zizmor: + name: Run zizmor + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Run zizmor + uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2 + with: + # Console + annotations work without GitHub Advanced Security; enable SARIF upload instead if the repo has code scanning. + advanced-security: false + annotations: true