From eac76c27f9652f0143ddd439be31160d1eed0e04 Mon Sep 17 00:00:00 2001 From: Walt Della Date: Wed, 20 Sep 2023 12:37:10 -0700 Subject: [PATCH] Add standard security workflows These check for common security issues, as well as ensure that we meet our license compliance obligations. --- .github/workflows/codeql.yml | 40 +++++++++++++++++++++++++ .github/workflows/dependency-review.yml | 11 +++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/dependency-review.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..5291b52 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,40 @@ +name: "CodeQL" + +on: + push: + branches: + - teleport + pull_request: + branches: + - teleport + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'python' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..1033917 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,11 @@ +name: Dependency Review + +on: + pull_request: + +jobs: + dependency-review: + if: ${{ !startsWith(github.head_ref, 'dependabot/') }} + uses: gravitational/shared-workflows/.github/workflows/dependency-review.yaml@main + permissions: + contents: read