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
I have the same issue when trying to publish versionlens.
The false positive is coming from a third party dependency @npmcli/config
key: newDefinition('key',{default: null,type: [null,String],description: ` A client key to pass when accessing the registry. Values should be in PEM format with newlines replaced by the string "\\n". For example: \`\`\`ini key="-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----" \`\`\` It is _not_ the path to a key file, though you can set a registry-scoped "keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". `,deprecated: ` \`key\` and \`cert\` are no longer used for most registry operations. Use registry scoped \`keyfile\` and \`cafile\` instead. Example: //other-registry.tld/:keyfile=/path/to/key.pem //other-registry.tld/:cafile=/path/to/cert.crt `,
flatten,}),
Thank you for reporting these cases. The private key scanning we are using does not seem to be very smart. I've added some check on top of it which should be able to ignore the false positive cases mentioned above. As soon as the PR is merged, I'll release a patch. Please let me know if this fixed your issues or if you run into other false positives.
Here is my use case. I am requiring typescript into a javascript extension.
constts=require('typescript');
so that I can use things like ts.isArrowFunction(node.initializer).
and have added typescript as a dependency. When I try to publish many "secrets" are flagged like
ERROR Potential security issue detected: Your extension package contains sensitive information that should not be published. Please remove these secrets before packaging.
found npm access token: npm_i_save_dev_types_Slash... [npm]
node_modules\typescript\lib\_tsc.js#6552:84-6552:124
found npm access token: npm_i_save_dev_types_Slash... [npm]
node_modules\typescript\lib\zh-cn\diagnosticMessages.generated.json#1709:8-1709:48
That first link points to this in the node_modules\typescript\lib\_tsc.js file:
npm_i_save_dev_types_Slashjest_or_npm_i_
The second error link points to
npm_i_save_dev_types_Slash_1_if_it_exists
They all seem to be diagnostic message related. I assume these are all false positives?
Same here, we're blocked from publishing our Svelte for VS Code extension because of false positives inside the TypeScript and prettier packages which are part of our dependencies. It has a false positive on strings like Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig
Activity
Added --allow-package-all-secrets to vsce package until microsoft/vsc…
pflannery commentedon May 15, 2025
I have the same issue when trying to publish versionlens.
The false positive is coming from a third party dependency @npmcli/config
scnwwu commentedon May 16, 2025
Same here. In addition, the scan will always be performed even with --allow option. It appears increased the CI time as I have many data files.
benibenj commentedon May 16, 2025
Thank you for reporting these cases. The private key scanning we are using does not seem to be very smart. I've added some check on top of it which should be able to ignore the false positive cases mentioned above. As soon as the PR is merged, I'll release a patch. Please let me know if this fixed your issues or if you run into other false positives.
ArturoDent commentedon May 19, 2025
[With vsce v3.4.1]
Here is my use case. I am requiring typescript into a javascript extension.
so that I can use things like
ts.isArrowFunction(node.initializer).and have added typescript as a dependency. When I try to publish many "secrets" are flagged like
That first link points to this in the
node_modules\typescript\lib\_tsc.jsfile:The second error link points to
They all seem to be diagnostic message related. I assume these are all false positives?
prakhar-gupta-08 commentedon May 20, 2025
We are also facing the multiple false positives being reported and failing our build pipelines. Its using the latest version of vsce package:
dummdidumm commentedon May 21, 2025
Same here, we're blocked from publishing our Svelte for VS Code extension because of false positives inside the TypeScript and prettier packages which are part of our dependencies. It has a false positive on strings like
Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfigbenibenj commentedon May 21, 2025
Thanks for reporting the npm false positives. I created a new issue to track this: #1153
vscode 0.1.2: bypass vsce's local secret scan so macOS can publish