mirror of https://github.com/fluxcd/flux2.git
commit
6df691598e
@ -1,25 +0,0 @@
|
|||||||
name: FOSSA
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: "^1.14.x"
|
|
||||||
- name: Add GOPATH to GITHUB_ENV
|
|
||||||
run: echo "GOPATH=$(go env GOPATH)" >>"$GITHUB_ENV"
|
|
||||||
- name: Add GOPATH to GITHUB_PATH
|
|
||||||
run: echo "$GOPATH/bin" >>"$GITHUB_PATH"
|
|
||||||
- name: Run FOSSA scan and upload build data
|
|
||||||
uses: fossa-contrib/fossa-action@v1
|
|
||||||
with:
|
|
||||||
# FOSSA Push-Only API Token
|
|
||||||
fossa-api-key: 5ee8bf422db1471e0bcf2bcb289185de
|
|
||||||
github-token: ${{ github.token }}
|
|
@ -0,0 +1,44 @@
|
|||||||
|
name: scan
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.15.x
|
||||||
|
- name: FOSSA Analysis
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: fossa-contrib/fossa-action@v1
|
||||||
|
with:
|
||||||
|
fossa-api-key: 5ee8bf422db1471e0bcf2bcb289185de
|
||||||
|
github-token: ${{ github.token }}
|
||||||
|
- name: CodeQL Init
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: "go"
|
||||||
|
- name: CodeQL Autobuild
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
- name: CodeQL Analysis
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
|
- name: Snyk Init
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: snyk/actions/setup@master
|
||||||
|
- name: Snyk Analysis
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
run: snyk test --sarif-file-output=snyk.sarif
|
||||||
|
env:
|
||||||
|
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||||
|
- name: Snyk Upload result to GitHub Code Scanning
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: github/codeql-action/upload-sarif@v1
|
||||||
|
with:
|
||||||
|
sarif_file: snyk.sarif
|
@ -1,15 +0,0 @@
|
|||||||
name: Snyk
|
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
security:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- name: Run Snyk to check for vulnerabilities
|
|
||||||
uses: snyk/actions/golang@master
|
|
||||||
env:
|
|
||||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
|
||||||
- name: Upload result to GitHub Code Scanning
|
|
||||||
uses: github/codeql-action/upload-sarif@v1
|
|
||||||
with:
|
|
||||||
sarif_file: snyk.sarif
|
|
Loading…
Reference in New Issue