Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
33d33e9
fix(code): Fix hash mismatch when uploading binaries
PeterSchafer May 2, 2025
1022e03
Merge pull request #5874 from snyk/fix/CLI-871_hash_mismatch
PeterSchafer May 5, 2025
ec900c3
feat: automatic integration of language server 160b93dc2aaa425fc3bab7…
team-ide-user May 5, 2025
ae28c66
Merge pull request #5876 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead May 5, 2025
39e3379
fix(test): fix testing composer-based PHP projects
nico-incubiq May 1, 2025
61dc85a
Merge pull request #5869 from snyk/fix/osm-2584-php-support
nico-incubiq May 7, 2025
420d62a
feat: automatic integration of language server be0352e868594be116a6ed…
team-ide-user May 7, 2025
cf94a9f
Merge pull request #5878 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead May 7, 2025
58e5143
feat: added aibom extension
denis-snyk Apr 11, 2025
ca8ea36
Merge pull request #5882 from snyk/feat/ai-bom
PeterSchafer May 8, 2025
0a48b96
fix: maven dverbose scope collisions failures
gemaxim May 7, 2025
cca4322
Merge pull request #5880 from snyk/fix/maven-dverbose-scope-collision
gemaxim May 8, 2025
61b391b
fix: add container test target reference support [CN-71]
aarlaud May 7, 2025
ea2509a
docs: synchronizing help from snyk/user-docs
May 12, 2025
3293ded
Merge pull request #5885 from snyk/docs/automatic-gitbook-update
CatalinSnyk May 12, 2025
01f53e3
feat: automatic integration of language server 655181e23a1733a9d7d59d…
team-ide-user May 12, 2025
89d59f4
Merge pull request #5879 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead May 12, 2025
e353d26
Merge branch 'main' into fix/CN-71-add-target-reference-support-for-c…
aarlaud May 12, 2025
8f6601e
chore: rm md docs changes
aarlaud May 12, 2025
080820c
Merge pull request #5881 from snyk/fix/CN-71-add-target-reference-sup…
aarlaud May 12, 2025
1e7a9c0
test: add acceptance tests for IaCV2 [IAC-3297]
ioannacaba May 8, 2025
8516078
Merge pull request #5875 from snyk/feat/IAC-3297/add-acceptance-tests…
ioannacaba May 13, 2025
4a77ca1
feat: automatic integration of language server 44a941375f2b27d2881d8f…
team-ide-user May 14, 2025
43cb36a
Merge pull request #5889 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead May 14, 2025
5abe28b
feat: [OSM-2668] introduced dfs for maven dverbose
gemaxim May 14, 2025
9c2b191
Merge branch 'release-candidate' into chore/mergeRC
CatalinSnyk May 15, 2025
7349ff9
Merge pull request #5892 from snyk/chore/mergeRC
PeterSchafer May 15, 2025
b7a84f5
Merge pull request #5891 from snyk/feat/OSM-2668/maven-dverbose-dfs
gemaxim May 15, 2025
646b2b8
fix: adding a new catch-all network interceptor to goproxy
May 13, 2025
cbc85bc
chore: refactor interceptor to use goproxy alias
May 13, 2025
e036595
fix: refactor internal proxy logic, remove unused functionality
May 13, 2025
b2c4423
chore: trace instead of debug
May 15, 2025
b7ee290
chore: remove obsolete failed auth handling logic
PeterSchafer May 15, 2025
052722c
fix: re-introduce better test coverage after refactor
May 15, 2025
9d4e7ff
fix: dropping now-unused errorhandler function
May 15, 2025
3ba514a
fix: upgraded GAF in go.mod
May 16, 2025
bc0091e
chore: removing unused line
May 16, 2025
a54981e
Merge pull request #5888 from snyk/dotkas/CLI-888/refactor-network-in…
dotkas May 16, 2025
9b6abd3
fix: [OSM-2662] maven dverbose show resolved deps versions only
gemaxim May 15, 2025
16ca6d1
Merge pull request #5894 from snyk/fix/OSM-2662/maven-dverbose-includ…
gemaxim May 19, 2025
60eb29c
Merge branch 'release-candidate' into chore/update_main_1297.1
PeterSchafer May 19, 2025
ec17876
Merge pull request #5905 from snyk/chore/update_main_1297.1
PeterSchafer May 19, 2025
8079d92
chore: add attach to CLI process debug configuration for VSCode
CatalinSnyk May 9, 2025
5d06e07
Merge pull request #5884 from snyk/chore/cli-debug-vscode-configuration
CatalinSnyk May 20, 2025
d324267
feat: Increase stability through network request retries
PeterSchafer May 14, 2025
e3565bb
Merge pull request #5906 from snyk/feat/CLI-888_network_retries
PeterSchafer May 20, 2025
9bde714
chore(ci): add deployment monitoring workflow
PeterSchafer May 20, 2025
d70f16a
Merge pull request #5907 from snyk/chore/CLI-441_deployment_test
PeterSchafer May 20, 2025
72dd095
feat: automatic integration of language server 913cdff39dd11355e3f0aa…
team-ide-user May 21, 2025
4c4b7b0
Merge pull request #5893 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead May 21, 2025
507c20b
feat: improved aibom error handling
denis-snyk May 20, 2025
0269cbb
Merge pull request #5908 from snyk/feat/improved-aibom-errors
denis-snyk May 21, 2025
5675ed4
fix(iac): Fix CVE-2023-46402 [IAC-3320]
alina-d-m May 22, 2025
0bafebe
Merge pull request #5911 from snyk/fix/IAC-3320/update-iac-cli-extension
alina-d-m May 22, 2025
58899b4
chore: version bump to allow ai-bom extension to use depgraphs
sburuiana-snyk May 22, 2025
d8d2d9c
Merge pull request #5912 from snyk/feat/aibom-depgraphs-verbump
denis-snyk May 23, 2025
18730ab
chore: extend deployment monitor script with version comparison
May 22, 2025
d62b939
Merge pull request #5915 from snyk/dotkas/CLI-915/ensure-consistent-v…
dotkas May 23, 2025
49aebf4
chore(ci): add Slack notification on Deployment Monitor failure
May 23, 2025
e3d15ac
Merge pull request #5917 from snyk/dotkas/CLI-924/add-slack-notificat…
dotkas May 23, 2025
ac5cb8d
chore(ci): Print details when failing to trigger snyk-images
PeterSchafer May 23, 2025
3765733
Merge pull request #5919 from snyk/chore/print_error_response
PeterSchafer May 23, 2025
a15b2de
chore(ci): Check the version earlier during a build
PeterSchafer May 23, 2025
b29d69b
Merge pull request #5918 from snyk/chore/early_version_check
PeterSchafer May 23, 2025
dda49bf
feat: automatic integration of language server c12d0ead1b51639781a0f8…
team-ide-user May 26, 2025
f9a3539
Merge pull request #5910 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead May 26, 2025
465055f
chore(ci): use single higher test timeout to reduce flakiness
PeterSchafer May 26, 2025
ee75fc2
Merge pull request #5924 from snyk/chore/increase_timeout
PeterSchafer May 26, 2025
dd4de81
feat(aibom): support optional html rendering when using --html
aztek May 26, 2025
c0fbec2
Merge pull request #5923 from snyk/chore/aibom-verbump
aztek May 26, 2025
0769c75
docs: synchronizing help from snyk/user-docs
May 27, 2025
2a21599
Merge pull request #5902 from snyk/docs/automatic-gitbook-update
j-luong May 27, 2025
c530015
chore(ci): increase test timeout to reduce flakiness
PeterSchafer May 27, 2025
f50c602
Merge pull request #5926 from snyk/chore/increase_test_timeout
PeterSchafer May 27, 2025
ffbbece
fix: aibom bom extraction bug fixes
denis-snyk May 27, 2025
c86bef3
fix: aibom bom extraction bug fixes
denis-snyk May 29, 2025
6666ae3
docs: synchronizing help from snyk/user-docs
May 29, 2025
fee0c82
Merge pull request #5927 from snyk/docs/automatic-gitbook-update
CatalinSnyk May 29, 2025
a1d31c7
chore: Enable configuration caching
PeterSchafer May 27, 2025
aac405e
Merge pull request #5928 from snyk/feat/CLI-616_config_cache
PeterSchafer Jun 2, 2025
35d031a
chore: increase test timeout
PeterSchafer Jun 2, 2025
1271e42
Merge pull request #5935 from snyk/test/increase_timeout_about
PeterSchafer Jun 2, 2025
3ba01d1
feat: use SNYK_TMP_PATH env var for temp dir path for Python tests
thomasschafer May 30, 2025
9fab7e9
Merge pull request #5931 from snyk/chore/bump-python-plugin-version
PeterSchafer Jun 3, 2025
acec996
chore: temporary ignore
CatalinSnyk Jun 3, 2025
27c5d1a
Merge pull request #5938 from snyk/fix/resolve-tar-fs-vuln
PeterSchafer Jun 3, 2025
ab492fe
chore(dependencies): migrate to @yao-pkg/pkg
PeterSchafer Jun 3, 2025
5ddd3aa
Merge pull request #5937 from snyk/chore/replace_pkg
PeterSchafer Jun 3, 2025
8ac67c6
feat: improvements for npm and yarn lockfile parsing
gemaxim May 28, 2025
29cec7f
Merge pull request #5929 from snyk/feat/npm-yarn-parsing-improvements
gemaxim Jun 4, 2025
35eb9a8
feat: automatic integration of language server c8d87716d1e2285454f161…
team-ide-user Jun 4, 2025
658cc5a
Merge pull request #5941 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead Jun 4, 2025
59992f8
chore: added aibom dep graph acceptance test
denis-snyk May 30, 2025
73dc4b5
chore: added aibom depgraph acceptance test
denis-snyk Jun 4, 2025
ad05302
chore(docs): added more emphasis on commit messages in the PR template
Jun 6, 2025
8609519
Merge pull request #5946 from snyk/dotkas/CLI-939/add-elaboration-to-…
dotkas Jun 6, 2025
5ab0676
fix: resolve max call stack size exceeded error
thomasschafer Jun 6, 2025
3800340
Merge pull request #5945 from snyk/fix/resolve-max-call-stack-size-ex…
thomasschafer Jun 6, 2025
9c36d43
feat: automatic integration of language server 840a807b4b878311e7b76f…
team-ide-user Jun 10, 2025
972efe2
Merge pull request #5944 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead Jun 10, 2025
54b4f56
fix: update filter(), ignore when expiry invalid
agatakrajewska Jun 10, 2025
fdf5a49
Merge pull request #5950 from snyk/fix/IGNR-1093-revert-dont-ignore-i…
PeterSchafer Jun 11, 2025
80a75aa
chore: Enable Extensions to add instrumentation data
PeterSchafer Jun 5, 2025
ddc327e
Merge pull request #5952 from snyk/feat/cli-898_extendAnalytics
PeterSchafer Jun 11, 2025
164618c
feat: [OSM-2902] Better support for comments in Dotnet global.json
nico-incubiq Jun 10, 2025
cb90984
Merge pull request #5951 from snyk/feat/better-globaljson-jsonc-parsing
nico-incubiq Jun 11, 2025
4ed65cc
fix(iac): output URL for IaC to contain correct domain [IAC-3367]
ioannacaba Jun 10, 2025
27d479b
Merge pull request #5949 from snyk/fix/IAC-3367/iac-output-url
ioannacaba Jun 12, 2025
217aa3e
feat(auth): support Snyk PATs for authentication
j-luong May 21, 2025
08d100b
Merge pull request #5909 from snyk/feat/cli-897_patSupport
j-luong Jun 13, 2025
f283dd9
fix: update the old SARIF schema link for code, container, iac and op…
CatalinSnyk Jun 5, 2025
b77feaf
Merge pull request #5942 from snyk/fix/update-sarif-schema-link
CatalinSnyk Jun 13, 2025
f7f7939
chore(test): updates pat tests to not use the localhost for fakeserver
j-luong Jun 13, 2025
f95ff88
Merge pull request #5962 from snyk/chore/updateTestToUseServerIP
j-luong Jun 16, 2025
e8fe9f8
feat: automatic integration of language server 5c0973c0f22184e158bb58…
team-ide-user Jun 16, 2025
14eba6a
Merge pull request #5954 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead Jun 16, 2025
9f4e6e5
Merge remote-tracking branch 'origin/release-candidate' into chore/up…
PeterSchafer Jun 16, 2025
f0e9008
Merge pull request #5965 from snyk/chore/update_main_1.1297.2
PeterSchafer Jun 16, 2025
69e6603
fix(ci): deployment alert
PeterSchafer Jun 16, 2025
bb4016b
Merge pull request #5966 from snyk/fix/deployment_alert
PeterSchafer Jun 16, 2025
8f7324c
chore: renamed workflow file name to match existing script convention
Jun 12, 2025
7d7048f
chore: re-wrote some docs a bit, added other workflow mention
Jun 12, 2025
c1f05ef
chore: re-structured github action for a modular approach
Jun 12, 2025
d33c373
chore: did the same to the help sync script
Jun 12, 2025
5f3df5f
chore: drop the wget from github
Jun 12, 2025
cdb65d5
chore: more colorful diff output
Jun 12, 2025
c527146
chore: prettier
Jun 13, 2025
1007ba8
chore: only add help folder
Jun 16, 2025
41c4b42
fix: custom base branch references
Jun 17, 2025
e13a08c
Merge pull request #5955 from snyk/dotkas/CLI-936/update-synchronizat…
dotkas Jun 17, 2025
a82f93b
chore: fixing bad path for README in user-docs
Jun 17, 2025
0b80168
chore: signing commits, though unsure if it works for the github acti…
Jun 17, 2025
c8f4a7c
fix: not adding /help, but readme.md
Jun 17, 2025
dc91cbc
chore: signing commits with Team CLI Bot
Jun 17, 2025
458dd9d
Merge pull request #5975 from snyk/dotkas/CLI-936/fix-broken-update-d…
dotkas Jun 18, 2025
bef6016
feat: automatic integration of language server fd0676889aa8d012a92198…
team-ide-user Jun 17, 2025
39462fd
Merge pull request #5968 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead Jun 18, 2025
b194d3a
chore(auth): remove pat autoregion config from intial release
j-luong Jun 16, 2025
617cfbb
Merge pull request #5967 from snyk/chore/cli-956_remotePatAutoRegionC…
j-luong Jun 18, 2025
053bb06
feat: support mcp components in aibom html output
ebhardjan Jun 18, 2025
5879171
Merge pull request #5961 from snyk/feat/bump-aibom-for-mcp-support
ebhardjan Jun 18, 2025
c91cfbb
fix: bumping `snyk-mvn-plugin` to require Node 20
Jun 11, 2025
82bced6
Merge pull request #5947 from snyk/dotkas/CLI-942/e2e/bump-mvn-plugin…
dotkas Jun 19, 2025
beb9fcc
feat: add npm/yarn alias support
aarlaud Jun 19, 2025
808fdf5
Merge pull request #5948 from snyk/feat/add-npm-yarn-alias-support-by…
aarlaud Jun 19, 2025
5ccabc9
feat: automatic integration of language server b2101136a81e709ed222ee…
team-ide-user Jun 23, 2025
c18f327
Merge pull request #5991 from snyk/feat/automatic-upgrade-of-ls
Team-Hammerhead Jun 24, 2025
a3f932e
chore: adding an ignore step to the docs update pipelines to avoid ov…
Jun 18, 2025
c6af4b8
Merge pull request #5980 from snyk/dotkas/CLI-936/optimize-test-pipel…
dotkas Jun 24, 2025
5959eb4
chore: wait for testing go until prepare build is done
Jun 24, 2025
81b282a
Merge pull request #5995 from snyk/dotkas/chore-fix-build-deps
dotkas Jun 24, 2025
c5e3a03
feat: container support for rpm packages scanning in SLE15.2+ images
adrobuta May 21, 2025
bd386c0
Merge pull request #5914 from snyk/feat/support-sle15.2+
adrobuta Jun 24, 2025
c196bae
fix: Fix handling of python requirement if dir with same name exists
calhar-snyk Jun 17, 2025
e85d506
Merge pull request #5982 from snyk/fix/unspecified-python-requirement…
calhar-snyk Jun 24, 2025
fdc8ec8
chore: sync with 1.1297.3 release and update gaf
danlucian Jun 24, 2025
2295cdc
Merge pull request #5997 from snyk/chore/update_main_1.1297.3
danlucian Jun 24, 2025
07d5970
chore: updating the order of commit/pr in the docs sync script
Jun 24, 2025
60ae93e
Merge pull request #5996 from snyk/dotkas/fix-more-docs-automation
dotkas Jun 25, 2025
be0a053
chore: fixing more docs issues
Jun 25, 2025
30274e4
Merge pull request #6002 from snyk/dotkas/docs-update-yet-again
dotkas Jun 25, 2025
a941c73
chore: fixing more docs issues
Jun 25, 2025
c22c0e8
Merge pull request #6011 from snyk/dotkas/docs-update-yet-again
dotkas Jun 25, 2025
30d26ab
feat: [OSM-2832] add support for dotnet without publish
37IulianPopovici Jun 23, 2025
b2de65d
docs: synchronizing README from snyk/user-docs
team-cli-bot Jun 25, 2025
a2e2d3e
docs: synchronizing help from snyk/user-docs
team-cli-bot Jun 25, 2025
210014a
chore: adding warning message to debug logs
Jun 25, 2025
81ed8df
chore: Invoke engine with instrumentation collector
PeterSchafer Jun 16, 2025
0ef892a
feat: automatic integration of language server c3703ce6473d7d13735059…
team-ide-user Jun 27, 2025
cc6e652
feat: Better gradle internal project depedencies support
gitphill Apr 23, 2025
eb49793
fix: Performance improvements in `snyk-gradle-plugin`
calhar-snyk Jul 7, 2025
a7f4ec4
fix: bump nodejs parser to handle manual aliases on indirct deps.
aarlaud Jul 7, 2025
03a7710
feat: automatic integration of language server 32d15f8b765abae260c5c3…
team-ide-user Jul 8, 2025
8981bf5
fix: bumped snyk-docker-plugin to v8.3.1 which introduces:
neil-snyk Jun 27, 2025
4863d2e
fix(logging): redact negotiate in debug logs
PeterSchafer Jul 9, 2025
e0bda60
chore(docs): update public docs paths for sync workflows
j-luong Jul 10, 2025
5366625
docs: synchronizing help from snyk/user-docs
team-cli-bot Jul 10, 2025
956290b
docs: synchronizing README from snyk/user-docs
team-cli-bot Jul 10, 2025
7737b09
chore: remove snyk fix call-to-action
danlucian Jul 10, 2025
bb66185
fix(code): Fix ichanged sarif and json file output handling
CatalinSnyk Jun 20, 2025
7687a76
feat: automatic integration of language server 3a7ebaa41ec0b4e31d65b5…
team-ide-user Jul 11, 2025
ddac3bc
docs: update release notes
j-luong Jul 11, 2025
11ddf28
Merge remote-tracking branch 'origin/release-candidate' into tmp/1752…
j-luong Jul 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,19 @@ workflows:
channel: cli-alerts
trusted-branch: main

- docs-only-check:
filters:
branches:
only:
- '/^docs\/.*/'

- prepare-build:
requires:
- secrets-scan
filters:
branches:
ignore:
- '/^docs\/.*/'

- code-analysis:
go_target_os: linux
Expand Down Expand Up @@ -437,7 +447,7 @@ workflows:
- nodejs-install
- team_hammerhead-cli
requires:
- secrets-scan
- prepare-build
filters:
branches:
ignore:
Expand Down Expand Up @@ -590,6 +600,7 @@ workflows:
go_os: linux
go_arch: arm64
go_download_base_url: << pipeline.parameters.go_download_base_url >>
shards: 6
context:
- nodejs-install
- team_hammerhead-cli
Expand All @@ -609,6 +620,7 @@ workflows:
go_os: linux
go_arch: arm64
go_download_base_url: << pipeline.parameters.fips_go_download_base_url >>
shards: 6
executor: docker-arm64
test_snyk_command: ./binary-releases/fips/snyk-linux-arm64
fips: 1
Expand Down Expand Up @@ -650,6 +662,7 @@ workflows:
go_os: linux
go_arch: arm64
go_download_base_url: << pipeline.parameters.go_download_base_url >>
shards: 6
context:
- nodejs-install
- team_hammerhead-cli
Expand Down Expand Up @@ -1024,6 +1037,7 @@ jobs:
name: Set version
command: |
make binary-releases/version binary-releases/fips/version
make release-validate-version
make ts-cli-binaries/version BINARY_RELEASES_FOLDER_TS_CLI=ts-cli-binaries
- run:
# required for one unit test (ts-binary-wrapper/test/unit/common.spec.ts:15:30)
Expand Down Expand Up @@ -1080,6 +1094,30 @@ jobs:
iac-scan: disabled
release-branch: main

docs-only-check:
executor: docker-amd64
steps:
- checkout
- run:
name: Check if all changed files are documentation (.md)
command: |
CHANGED_FILES=$(git diff --name-only main)

# If this step fails, check if you need to add another extension,
# or indeed if this PR adds more than docs-related changes.
ALLOWED_DOCS_EXTENSIONS="(\.md|\.svg|\.jpg)$"

for file in $CHANGED_FILES; do
echo "Checking extension of file: $file"
# -q: quiet
# -E: extended regular expressions
if ! echo "$file" | grep -q -E "$ALLOWED_DOCS_EXTENSIONS"; then
echo "Error: Disallowed file type found: $file"
exit 1
fi
done
exit 0

test-node:
executor: docker-amd64
environment:
Expand Down Expand Up @@ -1237,7 +1275,7 @@ jobs:
default: 'echo Running tests'
shards:
type: integer
default: 3
default: 4
executor: << parameters.executor >>
parallelism: << parameters.shards >>
environment:
Expand Down
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Pull Request Submission Checklist

- [ ] Follows [CONTRIBUTING](https://github.com/snyk/cli/blob/main/CONTRIBUTING.md) guidelines
- [ ] Commit messages
are [release-note ready](https://github.com/snyk/cli/blob/main/CONTRIBUTING.md#writing-commit-messages), emphasizing
_what_ was changed, not _how_.
- [ ] Includes detailed description of changes
- [ ] Contains risk assessment (Low | Medium | High)
- [ ] Highlights breaking API changes (if applicable)
Expand All @@ -17,6 +21,8 @@
## What's the product update that needs to be communicated to CLI users?

<!---
## Risk assessment (Low | Medium | High)?

## Any background context you want to provide?

## What are the relevant tickets?
Expand Down
265 changes: 265 additions & 0 deletions .github/workflows/deployment-monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
name: Deployment Tests

on:
push:
branches:
- main
paths:
- '.github/workflows/deployment-monitor.yml'
schedule:
# At minute 0 past every 2nd hour
- cron: '0 */2 * * *'
workflow_dispatch:

env:
SNYK_VERSION_DIR: snyk-versions-${{ github.run_id }}

jobs:
create_version_dir:
name: 'Create version directory'
runs-on: ubuntu-latest
steps:
- name: Create version directory for version comparison
run: |
mkdir -p $SNYK_VERSION_DIR
echo "Created directory for Snyk versions."
touch ${{ env.SNYK_VERSION_DIR }}/.keep
- uses: actions/upload-artifact@v4
with:
name: snyk-version-${{ github.job }}
path: ${{ env.SNYK_VERSION_DIR }}
include-hidden-files: 'true'

monitor_cdn:
name: 'deployment: CDN'
runs-on: ${{ matrix.os }}-latest
needs: create_version_dir
strategy:
fail-fast: false
matrix:
os: [ubuntu]
base_url: [static.snyk.io, downloads.snyk.io]
channel: [stable, preview]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt update && sudo apt install -y curl
- uses: actions/download-artifact@v4
with:
path: ${{ env.SNYK_VERSION_DIR }}
- name: Install Snyk
run: |
rm -f ./snyk
curl --retry 2 -L -v --compressed https://${{ matrix.base_url }}/cli/${{ matrix.channel }}/snyk-linux -o ./snyk-linux
curl --retry 2 -L -v --compressed https://${{ matrix.base_url }}/cli/${{ matrix.channel }}/snyk-linux.sha256 -o ./snyk-linux.sha256
echo --- Content shasum file ---
cat snyk-linux.sha256
echo --- Shasum binary ---
sha256sum snyk-linux
chmod +x ./snyk-linux
echo --- CLI version ---
./snyk-linux --version
echo --- Shasum comparison ---
sha256sum -c snyk-linux.sha256
- name: Set unique identifier for the artifact file name
run: echo "SUFFIX=${{ matrix.os }}-${{ matrix.base_url }}-${{ matrix.channel }}" >> $GITHUB_ENV
- name: Run snyk --version
run: ./snyk-linux --version > ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ env.SUFFIX }}.txt
- uses: actions/upload-artifact@v4
with:
name: snyk-version-${{ env.SUFFIX }}
path: ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ env.SUFFIX }}.txt

monitor_homebrew:
name: 'deployment: Homebrew (macos)'
runs-on: macos-latest
needs: create_version_dir
steps:
- uses: actions/download-artifact@v4
with:
path: ${{ env.SNYK_VERSION_DIR }}
- name: Install Snyk
run: |
brew tap snyk/tap
brew install snyk
- name: Run snyk --version
run: snyk --version > ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ github.job }}.txt
- uses: actions/upload-artifact@v4
with:
name: snyk-version-${{ github.job }}
path: ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ github.job }}.txt

monitor_scoop:
name: 'deployment: Scoop (windows)'
runs-on: windows-latest
needs: create_version_dir
steps:
- uses: actions/download-artifact@v4
with:
path: ${{ env.SNYK_VERSION_DIR }}
- name: Install Scoop and Snyk, run Snyk --version
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop bucket add snyk https://github.com/snyk/scoop-snyk
scoop install snyk
snyk --version > ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ github.job }}.txt
- uses: actions/upload-artifact@v4
with:
name: snyk-version-${{ github.job }}
path: ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ github.job }}.txt

monitor_npm:
name: 'deployment: npm (ubuntu)'
runs-on: ubuntu-latest
needs: create_version_dir
steps:
- uses: actions/download-artifact@v4
with:
path: ${{ env.SNYK_VERSION_DIR }}
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Install Snyk
run: npm install -g snyk
- name: Run snyk --version
run: snyk --version > ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ github.job }}.txt
- uses: actions/upload-artifact@v4
with:
name: snyk-version-${{ github.job }}
path: ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ github.job }}.txt

monitor_snyk_images:
name: 'deployment: snyk-images (snyk/snyk:linux)'
runs-on: ubuntu-latest
needs: create_version_dir
container:
image: snyk/snyk:linux
steps:
- uses: actions/download-artifact@v4
with:
path: ${{ env.SNYK_VERSION_DIR }}
- name: Run snyk --version
run: snyk --version > ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ github.job }}.txt
- uses: actions/upload-artifact@v4
with:
name: snyk-version-${{ github.job }}
path: ${{ env.SNYK_VERSION_DIR }}/snyk-version-${{ github.job }}.txt

compare_versions:
name: 'Compare Snyk Versions'
runs-on: ubuntu-latest
needs:
[
monitor_cdn,
monitor_homebrew,
monitor_scoop,
monitor_npm,
monitor_snyk_images,
]
steps:
- uses: actions/download-artifact@v4
with:
pattern: snyk-version-*
merge-multiple: true
path: ${{ env.SNYK_VERSION_DIR }}
- name: Check if the directory is not empty
run: |
cd "${{ env.SNYK_VERSION_DIR }}"
txt_files=$(ls *.txt 2>/dev/null)
if [ -z "$txt_files" ]; then
echo "❌ No .txt files found in ${{ env.SNYK_VERSION_DIR }}. Version comparison cannot proceed."
exit 2
fi
- name: If not empty, compare Snyk versions
run: |
cd "${{ env.SNYK_VERSION_DIR }}"
echo "Collected Snyk versions:"

stable_versions=()
preview_versions=()

# First, sort the *.txt files containg versions numbers into a preview and stable array
for file in *.txt; do
job_name=$(basename "$file" .txt)
version=$(cat "$file" | tr -d '\r\n')
echo "$job_name: $version"

# Fail fast if any of the files are empty
if [ -z "$version" ]; then
echo "❌ File $file is does not contain anything. All .txt files must contain a version number."
exit 3
fi

# As long as we have at least one non-empty file, we can set all_empty to 0 and not fail on empty files
all_empty=0

# Fill the stable and preview arrays
if [[ "$file" == *"-preview"* ]]; then
preview_versions+=("$version")
else
stable_versions+=("$version")
fi
done

# Check stable versions consistency
found_diff_stable=0
first_stable="${stable_versions[0]}"
echo "Checking stable versions consistency..."
for version in "${stable_versions[@]}"; do
if [ "$version" != "$first_stable" ]; then
found_diff_stable=1
echo " ❌ Found different stable version: $version (expected: $first_stable)"
fi
done

# Check preview versions consistency
found_diff_preview=0
first_preview="${preview_versions[0]}"
echo "Checking preview versions consistency..."
for version in "${preview_versions[@]}"; do
if [ "$version" != "$first_preview" ]; then
found_diff_preview=1
echo " ❌ Found different preview version: $version (expected: $first_preview)"
fi
done

if [ "$found_diff_stable" -eq 1 ] || [ "$found_diff_preview" -eq 1 ]; then
echo "❌ Snyk versions are NOT consistent across jobs."
exit 1
fi

echo "✅ All Snyk versions (stable and preview) are consistent within their respective channels."

notify_slack_on_failure:
if: ${{ failure() }}
name: 'Do a Slack notification on failure'
needs: compare_versions
runs-on: ubuntu-latest
steps:
- name: Post a message in a channel
uses: slackapi/slack-github-action@v2.1.0
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CLI_ALERTS_CHANNEL_ID }}
text: ":red_circle: *Deployment Monitor Failed!*"
blocks:
- type: "header"
text:
type: "plain_text"
text: ":red_circle: Deployment Monitor Failed!"
- type: "section"
text:
type: "mrkdwn"
text: "*Workflow*: `${{ github.workflow }}`"
- type: "section"
text:
type: "mrkdwn"
text: ":link: *View run:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Open in GitHub Actions>"
- type: "divider"
- type: "context"
elements:
- type: "mrkdwn"
text: ":warning: Please investigate the failure. This message was generated automatically."
Loading