This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o nounset -o pipefail | |
# Run the snyk scan and save exit code | |
snyk iac test --org=c6605e26-42f6-4c23-a347-72827bdab7cd --report --json > iac-results.json | |
exit_code=$? | |
# Query API for ID of previous scan and append to file | |
curl -s -L 'https://api.snyk.io/rest/orgs/c6605e26-42f6-4c23-a347-72827bdab7cd/cloud/scans?version=2024-02-28~beta&environment_id=58e8a75b-bd88-488c-9eb5-8b2ea8bef0a6' \ | |
--header "authorization: $snyk_token" | jq '.data[0].id' >> iac-results.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/homebrew/bin/python3 | |
import requests | |
# Replace with the relevant snyk api token and org ID | |
api_token = "" | |
org_id = "" | |
issuesPerPage = 100 | |
api_version = "2024-01-04" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
// Requires a configured NodeJS installation via https://plugins.jenkins.io/nodejs/ | |
tools { nodejs "NodeJS 18.4.0" } | |
stages { | |
stage('git clone') { | |
steps { | |
git url: 'https://github.com/mattatsnyk/TodoList-.net' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"public": [ | |
{ | |
"//": "used for pushing up webhooks from github", | |
"method": "POST", | |
"path": "/webhook/github", | |
"valid": [ | |
{ | |
"//": "accept all pull request state changes (these don't have files in them)", | |
"path": "pull_request.state", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. | |
version: v1.25.0 | |
# ignores vulnerabilities until expiry date; change duration by modifying expiry date | |
ignore: | |
'snyk:lic:golang:symbol:MPL-2.0': | |
- '*': | |
reason: this license is fine for keptn | |
created: 2022-07-12T09:35:29.655Z | |
patch: {} | |
exclude: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"public":[ | |
{ | |
"//":"used for pushing up webhooks from bitbucket-server", | |
"method":"POST", | |
"path":"/webhook/bitbucket-server/:webhookId" | |
} | |
], | |
"private":[ | |
{ |