Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/conformance/src/cases/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4219,13 +4219,13 @@ fn verify_security(root: &Path, id: &str) {
assert_contains(root, "crates/prismpm/src/config.rs", &["ParentDir"]);
}
"SE-03" => {
let source = read(root, "crates/prismpm/src/verification.rs");
let source = read(root, "crates/prismpm/src/sdk/process.rs");
assert!(source.contains("Command::new"));
assert!(!source.contains("sh -c"));
}
"SE-04" => assert_contains(
root,
"crates/prismpm/src/verification.rs",
"crates/prismpm/src/sdk/process.rs",
&["env_clear", "LC_ALL", "LANG"],
),
"SE-05" => assert_contains(
Expand Down
4 changes: 2 additions & 2 deletions crates/prismpm/src/replay/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use crate::error::PrismError;
use crate::holo::archive::parse_application;
use crate::holo::canonical::encode_value;
use crate::verification::{executable, run_process_limited};
use crate::sdk::process::{executable, run_process_limited, NoExtension};
use serde_json::{json, Map, Value};
use sha2::{Digest, Sha256};
use std::collections::{BTreeMap, BTreeSet};
Expand Down Expand Up @@ -254,7 +254,7 @@ fn run_guest(guest: &[u8], allocation: u64, requests: &[String]) -> Result<Vec<V
std::fs::write(path, bytes)
.map_err(|error| refused(format!("{}: {error}", path.display())))?;
}
run_process_limited(
run_process_limited::<NoExtension>(
"replay",
&node,
&[&runner, &wasm, &plan, &outcomes].map(|path| path.to_string_lossy().into_owned()),
Expand Down
7 changes: 4 additions & 3 deletions crates/prismpm/src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use std::path::{Component, Path};
mod advisory;
mod executable_file;
mod executable_inventory;
pub(crate) mod process;
pub(crate) use executable_file::ExecutableFile;

pub(crate) const STDLIB_SOURCES: &[u8] = include_bytes!("../sdk/stdlib-sources.tar");
Expand Down Expand Up @@ -410,7 +411,7 @@ pub fn fetch_project_dependencies(root: &Path) -> Result<Vec<serde_json::Value>,
let mut records = Vec::new();
if root.join("Cargo.toml").is_file() && root.join("Cargo.lock").is_file() {
let cargo = executable("cargo")?;
let record = crate::verification::run_process(
let record = process::run_process::<process::NoExtension>(
"cargo-fetch",
&cargo,
&["fetch".to_owned(), "--locked".to_owned()],
Expand All @@ -426,7 +427,7 @@ pub fn fetch_project_dependencies(root: &Path) -> Result<Vec<serde_json::Value>,
}
if root.join("package.json").is_file() && root.join("package-lock.json").is_file() {
let npm = executable("npm")?;
let record = crate::verification::run_process(
let record = process::run_process::<process::NoExtension>(
"npm-ci",
&npm,
&[
Expand Down Expand Up @@ -1402,7 +1403,7 @@ fn capture_platform_update(
environment.insert(name.to_owned(), value.to_string_lossy().into_owned());
}
}
let result = crate::verification::run_process_limited(
let result = process::run_process_limited::<process::NoExtension>(
"sdk-platform-update",
&node,
&[
Expand Down
Loading
Loading