Skip to content

Commit

Permalink
Merge pull request #24 from pantheon-systems/appsec-627
Browse files Browse the repository at this point in the history
CodeQL Fixes
  • Loading branch information
devink-pantheon authored Jun 7, 2024
2 parents 34714f6 + 8b0c47d commit 7786c81
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Configuration file for CodeQL.

paths-ignore:
- "devops/**"
- "docs/**"
- "**/tests/**"
- "test/**"
- "scripts/**"
- "**/__tests__/**"
- "**/__mock__/**"
50 changes: 50 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "CodeQL"

on:
push:
branches: ['master']
pull_request:
# The branches below must be a subset of the branches above
branches: [ '**' ]

jobs:
analyze:
name: Analyze
runs-on: [ ubuntu-latest ]
permissions:
packages: read
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['go']

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Configure git to use token
env:
GH_TOKEN: ${{ secrets.CODEQL_GOLANG_BUILD }}
run:
git config --global url."https://${GH_TOKEN}:[email protected]/pantheon-systems/".insteadOf "https://github.com/pantheon-systems/"

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
queries: security-extended

- name: Autobuild
env:
GOPRIVATE: github.com/pantheon-systems
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

0 comments on commit 7786c81

Please sign in to comment.