|
| 1 | +# Copyright 2020 The Knative Authors. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# This file is automagically synced here from github.com/knative-sandbox/.github |
| 16 | +# repo by knobots: https://github.com/mattmoor/knobots and will be overwritten. |
| 17 | + |
| 18 | +name: 'Security' |
| 19 | + |
| 20 | +on: |
| 21 | + pull_request: |
| 22 | + branches: [ 'master', 'release-*' ] |
| 23 | + |
| 24 | +jobs: |
| 25 | + analyze: |
| 26 | + name: Analyze |
| 27 | + runs-on: ubuntu-latest |
| 28 | + |
| 29 | + steps: |
| 30 | + - name: Checkout repository |
| 31 | + uses: actions/checkout@v2 |
| 32 | + with: |
| 33 | + # We must fetch at least the immediate parents so that if this is |
| 34 | + # a pull request then we can checkout the head. |
| 35 | + fetch-depth: 2 |
| 36 | + |
| 37 | + # If this run was triggered by a pull request event, then checkout |
| 38 | + # the head of the pull request instead of the merge commit. |
| 39 | + - run: git checkout HEAD^2 |
| 40 | + if: ${{ github.event_name == 'pull_request' }} |
| 41 | + |
| 42 | + # Initializes the CodeQL tools for scanning. |
| 43 | + - name: Initialize CodeQL |
| 44 | + uses: github/codeql-action/init@v1 |
| 45 | + with: |
| 46 | + languages: go |
| 47 | + |
| 48 | + - name: Autobuild |
| 49 | + uses: github/codeql-action/autobuild@v1 |
| 50 | + |
| 51 | + - name: Perform CodeQL Analysis |
| 52 | + uses: github/codeql-action/analyze@v1 |
0 commit comments