From 7bd49280305e1e0bf6ba1af77d2de40108b8175d Mon Sep 17 00:00:00 2001 From: Security & Stuff <74931194+SecurityAndStuff@users.noreply.github.com> Date: Wed, 19 Apr 2023 10:35:40 +0100 Subject: [PATCH] make security-extended a default Signed-off-by: Security & Stuff <74931194+SecurityAndStuff@users.noreply.github.com> --- templates/codeql-analysis-default.yml | 1 + templates/codeql-analysis-go.yml | 68 ++++++++++++++++++++++++ templates/codeql-analysis-javascript.yml | 1 + templates/codeql-analysis-python.yml | 1 + templates/codeql-analysis-ruby.yml | 1 + templates/codeql-config-go.yml | 0 6 files changed, 72 insertions(+) create mode 100644 templates/codeql-analysis-go.yml create mode 100644 templates/codeql-config-go.yml diff --git a/templates/codeql-analysis-default.yml b/templates/codeql-analysis-default.yml index 12d2689..9eb868a 100644 --- a/templates/codeql-analysis-default.yml +++ b/templates/codeql-analysis-default.yml @@ -41,6 +41,7 @@ jobs: with: config-file: ./.github/codeql/codeql-config-default.yml languages: ${{ matrix.language }} + queries: security-extended # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. diff --git a/templates/codeql-analysis-go.yml b/templates/codeql-analysis-go.yml new file mode 100644 index 0000000..7be1b5b --- /dev/null +++ b/templates/codeql-analysis-go.yml @@ -0,0 +1,68 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# Reach out on Slack at '#github-appsec-security' to get help. + +name: "CodeQL - Go" + +on: + push: + pull_request: + branches: ["main"] + schedule: + - cron: "36 4 * * 3" + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["go"] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + config-file: ./.github/codeql/codeql-config-javascript.yml + languages: ${{ matrix.language }} + queries: security-extended + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-and-quality + + # 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) + #- name: Autobuild + # uses: github/codeql-action/autobuild@v2 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/templates/codeql-analysis-javascript.yml b/templates/codeql-analysis-javascript.yml index 4df01a9..aaf17c7 100644 --- a/templates/codeql-analysis-javascript.yml +++ b/templates/codeql-analysis-javascript.yml @@ -41,6 +41,7 @@ jobs: with: config-file: ./.github/codeql/codeql-config-javascript.yml languages: ${{ matrix.language }} + queries: security-extended # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. diff --git a/templates/codeql-analysis-python.yml b/templates/codeql-analysis-python.yml index f4281cc..0d68e5f 100644 --- a/templates/codeql-analysis-python.yml +++ b/templates/codeql-analysis-python.yml @@ -41,6 +41,7 @@ jobs: with: config-file: ./.github/codeql/codeql-config-python.yml languages: ${{ matrix.language }} + queries: security-extended # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. diff --git a/templates/codeql-analysis-ruby.yml b/templates/codeql-analysis-ruby.yml index 0bbb466..e8f1219 100644 --- a/templates/codeql-analysis-ruby.yml +++ b/templates/codeql-analysis-ruby.yml @@ -41,6 +41,7 @@ jobs: with: config-file: ./.github/codeql/codeql-config-ruby.yml languages: ${{ matrix.language }} + queries: security-extended # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. diff --git a/templates/codeql-config-go.yml b/templates/codeql-config-go.yml new file mode 100644 index 0000000..e69de29