-
Notifications
You must be signed in to change notification settings - Fork 963
ci: enable CodeQL code scanning #5279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2f3d512
chore: enable GraphQL code scanning
matifali 4770ad8
Merge branch 'coder:main' into GraphQL-code-scanning
matifali ac47acd
removed the top commnets and description.
matifali df4df49
Update .github/workflows/codeql.yml
matifali a3e31ec
Update .github/workflows/codeql.yml
matifali 34521c0
Update .github/workflows/codeql.yml
matifali be83ef3
Update .github/workflows/codeql.yml
matifali a4ccada
Comment on when the action schedule runs
matifali 480b59d
Merge branch 'coder:main' into GraphQL-code-scanning
matifali 18f3fd9
Update .github/workflows/codeql.yml
deansheather 5a4c169
Update .github/workflows/codeql.yml
matifali bcde5f3
Update .github/workflows/codeql.yml
mafredri d7df6d4
Update codeql.yml
matifali 98d6886
Merge branch 'coder:main' into GraphQL-code-scanning
matifali 38ce3f1
add vscode extension recommendation
ghuntley 4aa5c05
remove MakeFile
matifali d4adaf7
Merge branch 'coder:main' into GraphQL-code-scanning
matifali d7b882f
Enable go mod cache
mafredri ea08e7a
fmt
mafredri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["main"] | ||
schedule: | ||
# run every week at 10:24 on Thursday | ||
- cron: "24 10 * * 4" | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ["go", "javascript"] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Setup Go | ||
if: matrix.language == 'go' | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "~1.19" | ||
|
||
- name: Go Cache Paths | ||
if: matrix.language == 'go' | ||
id: go-cache-paths | ||
run: | | ||
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | ||
|
||
- name: Go Mod Cache | ||
if: matrix.language == 'go' | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.go-cache-paths.outputs.go-mod }} | ||
key: ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Remove Makefile # workaround to prevent CodeQL from building site | ||
if: matrix.language == 'go' | ||
run: | | ||
# Disable Analysis step from trying to build the project. | ||
rm Makefile | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"github.vscode-codeql", | ||
"golang.go", | ||
"hashicorp.terraform", | ||
"esbenp.prettier-vscode", | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.