mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
07991dec83
Pin actions/checkout usage to latest 3.x or 4.x as appropriate. These were previously pointing to `@4` or `@3` which pull in the latest versions at these tags as they are released, with the potential to break our workflows if a breaking change or malicious version for either of these streams are released. Changing this to a pinned version also means that dependabot will keep this in the pinend version format (e.g., referencing a SHA) when it opens a PR to bump the dependency. Updates #cleanup Signed-off-by: Mario Minardi <mario@tailscale.com>
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
name: govulncheck
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 12 * * *" # 8am EST / 10am PST / 12pm UTC
|
|
workflow_dispatch: # allow manual trigger for testing
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/govulncheck.yml"
|
|
|
|
jobs:
|
|
source-scan:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
|
|
- name: Install govulncheck
|
|
run: ./tool/go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
|
|
- name: Scan source code for known vulnerabilities
|
|
run: PATH=$PWD/tool/:$PATH "$(./tool/go env GOPATH)/bin/govulncheck" -test ./...
|
|
|
|
- name: Post to slack
|
|
if: failure() && github.event_name == 'schedule'
|
|
uses: slackapi/slack-github-action@v1.24.0
|
|
env:
|
|
SLACK_BOT_TOKEN: ${{ secrets.GOVULNCHECK_BOT_TOKEN }}
|
|
with:
|
|
channel-id: 'C05PXRM304B'
|
|
payload: |
|
|
{
|
|
"blocks": [
|
|
{
|
|
"type": "section",
|
|
"text": {
|
|
"type": "mrkdwn",
|
|
"text": "Govulncheck failed in ${{ github.repository }}"
|
|
},
|
|
"accessory": {
|
|
"type": "button",
|
|
"text": {
|
|
"type": "plain_text",
|
|
"text": "View results"
|
|
},
|
|
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
}
|
|
}
|
|
]
|
|
}
|