NPM client:
audit 404 Not Found - POST http://<artifactory-hostname>/artifactory/api/npm/<npm-virtual-repository>/-/npm/v1/security/audits/quick Failed to fetch audit report for repo tst-npm. status: 404 cause: Virtual repository <npm-repository-name> does not have any npm audit providers. Aborting npm audit request... npm ERR! audit endpoint returned an error
Artifactory logs:
-12T10:42:43.162Z [jfrt ] [ERROR] [fe16b3fe3367b762] [a.n.r.NpmRequestHelperImpl:651] [http-nio-8081-exec-1] - Only Virtual repositories support npm audit. <npm-local-repository> is not virtual 2023-07-12T10:42:43.163Z [jfrt ] [ERROR] [fe16b3fe3367b762] [a.n.r.NpmRequestHelperImpl:252] [http-nio-8081-exec-1] - Repo <npm-local-repository> does not support npm audit
Local repositories do not support the 'npm audit' command.
Resolution steps:
To make the audit command work, you need to set up a virtual NPM repository that includes at least one remote repository and configure it as the registry in the .npmrc file. If the virtual repository is already configured, run the 'npm audit' command by providing the virtual repository URL as part of the command:
npm audit --registry <NPM virtual repository URL>