Proposal
Add an installMethod option to the existing snyk-cli feature:
npm — current behavior and default for backward compatibility
standalone — download Snyk's published standalone executable
Example:
Motivation
The current feature always installs Snyk through npm. This makes installation
dependent on Node/npm and on npm registry configuration visible to the root user
during the feature build.
For example, an existing private-registry or authentication configuration can
cause the feature build to fail with npm E401, even though Snyk itself is a
public package.
Snyk officially publishes standalone executables for:
- Linux amd64
- Linux arm64
- Alpine amd64
- Alpine arm64
It also publishes corresponding .sha256 files.
Proposed behavior
- The standalone installation path would:
- Select the appropriate Linux/Alpine and amd64/arm64 artifact.
- Map version: latest to Snyk's stable release channel.
- Support pinned versions with or without a leading v.
- Download and verify the published SHA-256 checksum.
- Install the executable at /usr/local/bin/snyk.
- Avoid installing Node, npm, or Python.
- Preserve npm as the default installation method.
- Authentication would remain outside the feature installation.
Documentation
Standalone installation:
https://docs.snyk.io/developer-tools/snyk-cli/install-or-update-the-snyk-cli
Binary verification:
https://docs.snyk.io/developer-tools/snyk-cli/install-or-update-the-snyk-cli/verifying-cli-standalone-binaries
Proposal
Add an
installMethodoption to the existingsnyk-clifeature:npm— current behavior and default for backward compatibilitystandalone— download Snyk's published standalone executableExample:
{ "features": { "ghcr.io/devcontainers-extra/features/snyk-cli:1": { "installMethod": "standalone", "version": "latest" } } }Motivation
The current feature always installs Snyk through npm. This makes installation
dependent on Node/npm and on npm registry configuration visible to the root user
during the feature build.
For example, an existing private-registry or authentication configuration can
cause the feature build to fail with npm E401, even though Snyk itself is a
public package.
Snyk officially publishes standalone executables for:
It also publishes corresponding .sha256 files.
Proposed behavior
Documentation
Standalone installation:
https://docs.snyk.io/developer-tools/snyk-cli/install-or-update-the-snyk-cli
Binary verification:
https://docs.snyk.io/developer-tools/snyk-cli/install-or-update-the-snyk-cli/verifying-cli-standalone-binaries