Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yarn audit does not work with an external repository #7012

Open
adamscybot opened this issue Feb 7, 2019 · 9 comments
Open

Yarn audit does not work with an external repository #7012

adamscybot opened this issue Feb 7, 2019 · 9 comments

Comments

@adamscybot
Copy link

adamscybot commented Feb 7, 2019

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

When running yarn audit with the --registry flag, it uses the main yarn repo anyway.

If the current behavior is a bug, please provide the steps to reproduce.

Execute yarn audit --registry https://registry.npmjs.org/

What is the expected behavior?

Audit calls are made to the defined registry. This is especially important for everyone with third party repo's where the outside world it blocked on CI agents. Or if you're using some kind of proxy.

Please mention your node.js, yarn and operating system version.

Mac Os Mojave
Yarn 1.13.0
Node 10.15.1

@abhisheksoni27
Copy link

abhisheksoni27 commented Feb 17, 2019

What exactly is happening on LINE 217 ?

async _fetchAudit(auditTree: AuditTree): Object {
let responseJson;
const registry = YARN_REGISTRY;
this.reporter.verbose(`Audit Request: ${JSON.stringify(auditTree, null, 2)}`);
const requestBody = await gzip(JSON.stringify(auditTree));
const response = await this.config.requestManager.request({
url: `${registry}/-/npm/v1/security/audits`,
method: 'POST',
body: requestBody,
headers: {
'Content-Encoding': 'gzip',
'Content-Type': 'application/json',
Accept: 'application/json',
},
});

Do you have an endpoint configured that automatically calls npm's audit registry ?

@gaiazov
Copy link

gaiazov commented May 9, 2019

@abhisheksoni27 on line 217 the YARN_REGISTRY constant is used, which corresponds to https://registry.yarnpkg.com

export const YARN_REGISTRY = 'https://registry.yarnpkg.com';

@pratyushj
Copy link

Hey, can I try to solve this bug?

@eugenesimakin
Copy link

Hi @pratyushj, the issue already has its PR #7263. Thanks!
In addition to that, it has a duplicate PR #6484

@MadaraUchiha
Copy link

This is still open in 2022, any update on this?

@GeorgeWL
Copy link

any update? still seeing this in March 2022

@GodOfCoding1
Copy link

Hi , Is this still open in 2022?

@srcimon
Copy link

srcimon commented May 12, 2023

Still open in 2023.

@M1chael
Copy link

M1chael commented Jun 27, 2024

Greetings from 2k24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests