From 1f21f7805f766a90507a73a386ac8319c2401014 Mon Sep 17 00:00:00 2001 From: ganeshkumarsv <53483484+ganeshkumarsv@users.noreply.github.com> Date: Tue, 23 Aug 2022 09:19:35 -0400 Subject: [PATCH] Setup Code Scanning on datadog-api-client-go (#1592) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Setup Code Scanning on datadog-api-client-go * remove python * Create codeql_config.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * Update codeql-analysis.yml * adding go mod files to api * Update codeql-analysis.yml * Update codeql-analysis.yml * remove api/go mod files * Delete codeql_config.yml * Update codeql-analysis.yml * remove trigger on pull request Co-authored-by: Thomas Hervé --- .github/workflows/codeql-analysis.yml | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000000..c1ed1fb4c24 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,48 @@ +name: "CodeQL" + +on: + push: + branches: [ "master" ] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - uses: actions/setup-go@v2 + with: + go-version: 1.17.11 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + source-root: api + + # 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-extended,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 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2