403 Error:

ARTIFACTORY: Why ‘npm audit’ command failed with errors (when Xray is not configured)

AuthorFullName__c
Yonatan Hen
articleNumber
000005817
FirstPublishedDate
2023-07-17T14:40:10Z
lastModifiedDate
2025-07-20
VersionNumber
2

NPM client:
npm WARN audit 403 Forbidden - POST http://<artifactory-hostname>/artifactory/api/npm/<npm-virtual-repository>/-/npm/v1/security/audits/quick
Failed to fetch audit report for repo <npm-virtual-repository>. status: 403 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:
[jfrt ] [ERROR] [56d73001fe53e7b8] [a.n.r.NpmRequestHelperImpl:260] [http-nio-8081-exec-1] - Failed to fetch audit report for repo <npm-virtual-repository>. status: 403 cause: Virtual repository <npm-virtual-repository>  does not have any npm audit providers. Aborting npm audit request

Resolution steps:
The npm registry URL might be set incorrectly. For example, the registry might be configured with the HTTP protocol (http://registry.npmjs.org) instead of the HTTPS protocol (https://registry.npmjs.org).