File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ use crate::colors;
2121use crate :: factory:: CliFactory ;
2222use crate :: http_util;
2323use crate :: http_util:: HttpClient ;
24- use crate :: http_util:: HttpClientProvider ;
2524use crate :: util:: console:: escape_terminal_control_chars;
2625
2726struct FixableAction {
@@ -45,7 +44,7 @@ pub async fn audit(
4544 let snapshot = npm_resolver. resolution ( ) . snapshot ( ) ;
4645
4746 let npm_url = & factory. npmrc ( ) ?. default_config . registry_url ;
48- let http_provider = HttpClientProvider :: new ( None , None ) ;
47+ let http_provider = factory . http_client_provider ( ) ;
4948 let http_client = http_provider
5049 . get_or_create ( )
5150 . context ( "Failed to create HTTP client" ) ?;
Original file line number Diff line number Diff line change 1+ -----BEGIN CERTIFICATE-----
2+ MIIDIzCCAgugAwIBAgIJAMKPPW4tsOymMA0GCSqGSIb3DQEBCwUAMCcxCzAJBgNV
3+ BAYTAlVTMRgwFgYDVQQDDA9FeGFtcGxlLVJvb3QtQ0EwIBcNMTkxMDIxMTYyODIy
4+ WhgPMjExODA5MjcxNjI4MjJaMCcxCzAJBgNVBAYTAlVTMRgwFgYDVQQDDA9FeGFt
5+ cGxlLVJvb3QtQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDMH/IO
6+ 2qtHfyBKwANNPB4K0q5JVSg8XxZdRpTTlz0CwU0oRO3uHrI52raCCfVeiQutyZop
7+ eFZTDWeXGudGAFA2B5m3orWt0s+touPi8MzjsG2TQ+WSI66QgbXTNDitDDBtTVcV
8+ 5G3Ic+3SppQAYiHSekLISnYWgXLl+k5CnEfTowg6cjqjVr0KjL03cTN3H7b+6+0S
9+ ws4rYbW1j4ExR7K6BFNH6572yq5qR20E6GqlY+EcOZpw4CbCk9lS8/CWuXze/vMs
10+ OfDcc6K+B625d27wyEGZHedBomT2vAD7sBjvO8hn/DP1Qb46a8uCHR6NSfnJ7bXO
11+ G1igaIbgY1zXirNdAgMBAAGjUDBOMB0GA1UdDgQWBBTzut+pwwDfqmMYcI9KNWRD
12+ hxcIpTAfBgNVHSMEGDAWgBTzut+pwwDfqmMYcI9KNWRDhxcIpTAMBgNVHRMEBTAD
13+ AQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB9AqSbZ+hEglAgSHxAMCqRFdhVu7MvaQM0
14+ P090mhGlOCt3yB7kdGfsIrUW6nQcTz7PPQFRaJMrFHPvFvPootkBUpTYR4hTkdce
15+ H6RCRu2Jxl4Y9bY/uezd9YhGCYfUtfjA6/TH9FcuZfttmOOlxOt01XfNvVMIR6RM
16+ z/AYhd+DeOXjr35F/VHeVpnk+55L0PYJsm1CdEbOs5Hy1ecR7ACuDkXnbM4fpz9I
17+ kyIWJwk2zJReKcJMgi1aIinDM9ao/dca1G99PHOw8dnr4oyoTiv8ao6PWiSRHHMi
18+ MNf4EgWfK+tZMnuqfpfO9740KzfcVoMNo4QJD4yn5YxroUOO/Azi
19+ -----END CERTIFICATE-----
Original file line number Diff line number Diff line change 1+ {
2+ "tempDir" : true ,
3+ "steps" : [
4+ {
5+ "args" : " install" ,
6+ "output" : " install.out"
7+ },
8+ {
9+ "args" : " audit" ,
10+ "output" : " audit.out" ,
11+ "envs" : {
12+ "DENO_CERT" : " $PWD/RootCA.pem" ,
13+ "NPM_CONFIG_REGISTRY" : " https://localhost:5545/"
14+ }
15+ }
16+ ]
17+ }
Original file line number Diff line number Diff line change 1+ No known vulnerabilities found
Original file line number Diff line number Diff line change 1+ Download http://localhost:4260/@denotest%2fsay-hello
2+ Download http://localhost:4260/@denotest/say-hello/1.0.0.tgz
3+ Initialize @denotest/say-hello@1.0.0
4+ Installed 1 package in [WILDLINE]
5+ Reused 0 packages from cache
6+ Downloaded 0 packages from JSR
7+ Downloaded 1 package from npm
8+ +
9+
10+ Dependencies:
11+ + npm:@denotest/say-hello 1.0.0
12+ [WILDLINE]
Original file line number Diff line number Diff line change 1+ {
2+ "dependencies" : {
3+ "@denotest/say-hello" : " 1.0.0"
4+ }
5+ }
Original file line number Diff line number Diff line change @@ -417,6 +417,9 @@ async fn main_server(
417417 remote_addr : SocketAddr ,
418418) -> Result < Response < UnsyncBoxBody < Bytes , Infallible > > , anyhow:: Error > {
419419 match ( req. method ( ) , req. uri ( ) . path ( ) ) {
420+ ( & Method :: POST , "/-/npm/v1/security/advisories/bulk" ) => {
421+ npm_registry:: npm_security_advisories_bulk ( req) . await
422+ }
420423 ( _, "/echo_server" ) => {
421424 let ( parts, body) = req. into_parts ( ) ;
422425 let mut response = Response :: new ( UnsyncBoxBody :: new ( Full :: new (
Original file line number Diff line number Diff line change @@ -604,7 +604,7 @@ fn npm_security_advisories_bulk_no_vulns()
604604 . map_err ( |e| e. into ( ) )
605605}
606606
607- async fn npm_security_advisories_bulk (
607+ pub ( super ) async fn npm_security_advisories_bulk (
608608 req : Request < Incoming > ,
609609) -> Result < Response < UnsyncBoxBody < Bytes , Infallible > > , anyhow:: Error > {
610610 // Respond with 400 for a request whose body can't be read or isn't valid
You can’t perform that action at this time.
0 commit comments