You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command run: snyk test --policy-path='custom-file.yml'
Expected behaviour
The test command uses the content of custom-file.yml as policy.
Actual behaviour
The test command ignores the content of custom-file.yml and runs as if no policy file has been supplied.
Steps to reproduce
Create a valid Snyk policy file with a name other than .snyk (like custom-file.yml)
Run snyk test using the --policy-path option to point to the created policy file
This may be related to this line of code in policy.ts, and similar lines in the same file (here, here). The load method is invoked by the CLI here, and the policy-path is passed as an argument via policyLocations.
It seems that the code expects the file to be called .snyk. This contradicts the README, which states:
The policy is loaded, typically this will be a YAML file named .snyk (but can be loaded from another filename).
The text was updated successfully, but these errors were encountered:
node -v
: v16.14.2npm -v
: 8.5.5snyk test --policy-path='custom-file.yml'
Expected behaviour
The
test
command uses the content ofcustom-file.yml
as policy.Actual behaviour
The
test
command ignores the content ofcustom-file.yml
and runs as if no policy file has been supplied.Steps to reproduce
.snyk
(likecustom-file.yml
)snyk test
using the--policy-path
option to point to the created policy fileThis may be related to this line of code in
policy.ts
, and similar lines in the same file (here, here). The load method is invoked by the CLI here, and thepolicy-path
is passed as an argument via policyLocations.It seems that the code expects the file to be called
.snyk
. This contradicts the README, which states:The text was updated successfully, but these errors were encountered: