diff --git a/.github/workflows/reusable-codeql-actions.yml b/.github/workflows/reusable-codeql-actions.yml index 2da32c1..fb675b0 100644 --- a/.github/workflows/reusable-codeql-actions.yml +++ b/.github/workflows/reusable-codeql-actions.yml @@ -16,6 +16,12 @@ on: type: string default: security-extended +permissions: {} + +defaults: + run: + shell: bash + jobs: analyze: name: CodeQL analyze (Actions) @@ -29,6 +35,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Initialize CodeQL uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 diff --git a/.github/workflows/reusable-codeql-go.yml b/.github/workflows/reusable-codeql-go.yml index 4a05b97..077ad78 100644 --- a/.github/workflows/reusable-codeql-go.yml +++ b/.github/workflows/reusable-codeql-go.yml @@ -25,11 +25,17 @@ on: type: string default: autobuild +permissions: {} + +defaults: + run: + shell: bash jobs: analyze: name: CodeQL analyze (Go) runs-on: ubuntu-latest + timeout-minutes: 60 permissions: security-events: write contents: read @@ -38,6 +44,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Set up Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 diff --git a/.github/workflows/reusable-codeql-js.yml b/.github/workflows/reusable-codeql-js.yml index d926daf..dceee50 100644 --- a/.github/workflows/reusable-codeql-js.yml +++ b/.github/workflows/reusable-codeql-js.yml @@ -9,11 +9,17 @@ on: type: string default: "javascript-typescript" +permissions: {} + +defaults: + run: + shell: bash jobs: analyze: name: CodeQL analyze (JS/TS) runs-on: ubuntu-latest + timeout-minutes: 30 permissions: security-events: write contents: read @@ -22,6 +28,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Initialize CodeQL uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 diff --git a/.github/workflows/reusable-codeql-swift.yml b/.github/workflows/reusable-codeql-swift.yml index f91bb5f..d3b0e16 100644 --- a/.github/workflows/reusable-codeql-swift.yml +++ b/.github/workflows/reusable-codeql-swift.yml @@ -52,6 +52,12 @@ on: type: string default: security-extended +permissions: {} + +defaults: + run: + shell: bash + jobs: analyze: name: CodeQL analyze (Swift) @@ -65,6 +71,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Select the newest installed Xcode if: inputs.select-newest-xcode @@ -98,13 +106,17 @@ jobs: queries: ${{ inputs.queries }} - name: Build (clean, unsigned — CodeQL traces the compile) + env: + CODEQL_XCODE_PROJECT: ${{ inputs.project }} + CODEQL_XCODE_SCHEME: ${{ inputs.scheme }} + CODEQL_XCODE_DERIVED_DATA: ${{ inputs.derived-data-path }} run: | set -o pipefail xcodebuild clean build \ - -project "${{ inputs.project }}" \ - -scheme "${{ inputs.scheme }}" \ + -project "$CODEQL_XCODE_PROJECT" \ + -scheme "$CODEQL_XCODE_SCHEME" \ -destination 'platform=macOS' \ - -derivedDataPath "${{ inputs.derived-data-path }}" \ + -derivedDataPath "$CODEQL_XCODE_DERIVED_DATA" \ -skipPackagePluginValidation \ CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO