Skip to content

Commit

Permalink
Add codeql security analysis workflow to the repo (#1339)
Browse files Browse the repository at this point in the history
* Add codeql security analysis workflow to the repo

Adds Github's security scanner to the workflows 

https://github.blog/2020-09-30-code-scanning-is-now-available/

* Only scan Go

Only scan Go files for better performance

* Remove on pull_request, and extra branch

* Remove names, and extra comments
  • Loading branch information
spring1843 authored Feb 14, 2022
1 parent b396ad6 commit 4c55110
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "CodeQL"

on:
push:
branches: [ main ]
schedule:
- cron: '22 18 * * 0'

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

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

steps:
- uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- uses: github/codeql-action/analyze@v1

0 comments on commit 4c55110

Please sign in to comment.