fn verify(&self) -> Result<()> {
        let scrutiny = ScrutinyQueryComponentResolvers::from_env()?;

        let allowlist: AllowList = serde_json5::from_str(
            &fs::read_to_string(&self.allowlist_path).context("Failed to read allowlist")?,
        )
        .context("Failed to deserialize allowlist")?;

        let deps = match verify_component_resolvers(scrutiny, allowlist)? {
            Ok(deps) => deps,
            Err(violations) => {
                bail!(
                    "
Static Component Resolver Capability Analysis Error:
The component resolver verifier found some components configured to be resolved using
a privileged component resolver.

If it is intended for these components to be resolved using the given resolver, add an entry
to the allowlist located at: {}

Verification Errors:
{}",
                    self.allowlist_path,
                    serde_json::to_string_pretty(&violations).unwrap()
                );
            }
        };

        // Write out the depfile and stampfile.
        if let Some(depfile_path) = self.depfile_path.as_ref() {
            let stamp_path = self
                .stamp_path
                .as_ref()
                .ok_or(anyhow!("Cannot specify depfile without specifying stamp"))?;
            let mut depfile =
                fs::File::create(depfile_path).context("failed to create dep file")?;

            write!(depfile, "{}: {}", stamp_path, deps.get().join(" "))
                .context("failed to write to dep file")?;
        }

        if let Some(stamp_path) = self.stamp_path.as_ref() {
            fs::write(stamp_path, "Verified\n").context("failed to write stamp file")?;
        }

        Ok(())
    }
/// Launches Scrutiny and performs the component resolver analysis. The
/// results are then filtered based on the provided allowlist and any
/// errors that are not allowlisted cause the verification to fail listing
/// all non-allowlisted errors.
Launches Scrutiny and performs the component resolver analysis. The
results are then filtered based on the provided allowlist and any
errors that are not allowlisted cause the verification to fail listing
all non-allowlisted errors.
Launches Scrutiny and performs the component resolver analysis . The results are then filtered based on the provided allowlist and any errors that are not allowlisted cause the verification to fail listing all non - allowlisted errors .
fn verify(&self) -> Result<()> {
        let scrutiny = ScrutinyQueryComponentResolvers::from_env()?;
        let allowlist: AllowList = serde_json5::from_str(
            &fs::read_to_string(&self.allowlist_path).context("Failed to read allowlist")?,
        )
        .context("Failed to deserialize allowlist")?;
        let deps = match verify_component_resolvers(scrutiny, allowlist)? {
            Ok(deps) => deps,
            Err(violations) => {
                bail!(
                    "
Static Component Resolver Capability Analysis Error:
The component resolver verifier found some components configured to be resolved using
a privileged component resolver.
If it is intended for these components to be resolved using the given resolver, add an entry
to the allowlist located at: {}
Verification Errors:
{}",
                    self.allowlist_path,
                    serde_json::to_string_pretty(&violations).unwrap()
                );
            }
        };
        // Write out the depfile and stampfile.
        if let Some(depfile_path) = self.depfile_path.as_ref() {
            let stamp_path = self
                .stamp_path
                .as_ref()
                .ok_or(anyhow!("Cannot specify depfile without specifying stamp"))?;
            let mut depfile =
                fs::File::create(depfile_path).context("failed to create dep file")?;
            write!(depfile, "{}: {}", stamp_path, deps.get().join(" "))
                .context("failed to write to dep file")?;
        }
        if let Some(stamp_path) = self.stamp_path.as_ref() {
            fs::write(stamp_path, "Verified\n").context("failed to write stamp file")?;
        }
        Ok(())
    }
fn verify ( & self ) -> Result < ( ) > { let scrutiny = ScrutinyQueryComponentResolvers :: from_env ( ) ? ; let allowlist : AllowList = serde_json5 :: from_str ( & fs :: read_to_string ( & self . allowlist_path ) . context ( " " ) ? , ) . context ( " " ) ? ; let deps = match verify_component_resolvers ( scrutiny , allowlist ) ? { Ok ( deps ) => deps , Err ( violations ) => { bail ! ( " " self allowlist_path serde_json to_string_pretty ( violations ) unwrap ( ) ) ; } } ; // Write out the depfile and stampfile. if let Some ( depfile_path ) = self . depfile_path . as_ref ( ) { let stamp_path = self . stamp_path . as_ref ( ) . ok_or ( anyhow ! ( " " ) ) ? ; let mut depfile = fs :: File :: create ( depfile_path ) . context ( " " ) ? ; write ! ( depfile " " stamp_path deps get ( ) join ( " " ) ) . context ( " " ) ? ; } if let Some ( stamp_path ) = self . stamp_path . as_ref ( ) { fs :: write ( stamp_path , " \n " ) . context ( " " ) ? ; } Ok ( ( ) ) }
Launches Scrutiny and performs the component resolver analysis.
Launches Scrutiny and performs the component resolver analysis .
&self
&self