feat(provenance): enforce trusted Ed25519 package signatures in publish, lockfile, and locked builds
This commit is contained in:
1 parent
21babb8c31
commit
85f2ae274f
21 files changed
+519
-15
No files matched your search
@@ -113,6 +113,8 @@ serialize_contexts_body(const std::map<std::string, LockContextRecord, std::less
|
||||
",\"sha256\":" + json_quote(e.sha256) + ",\"builder\":" + json_quote(e.builder) +
|
||||
",\"features\":" + json_array(e.features, json_quote) +
|
||||
",\"build_dependency\":" + std::string{e.build_dependency ? "true" : "false"} +
|
||||
(e.signature ? ",\"signature\":" + json_quote(*e.signature) : std::string{}) +
|
||||
(e.public_key ? ",\"public_key\":" + json_quote(*e.public_key) : std::string{}) +
|
||||
'}';
|
||||
});
|
||||
out += '}';
|
||||
@@ -252,6 +254,12 @@ parse_lockfile(std::string_view json_text) {
|
||||
e.builder = get_str(*eo, "builder");
|
||||
e.features = get_str_array(*eo, "features");
|
||||
e.build_dependency = get_bool(*eo, "build_dependency", false);
|
||||
if (const auto sig = get_str(*eo, "signature"); !sig.empty()) {
|
||||
e.signature = sig;
|
||||
}
|
||||
if (const auto key = get_str(*eo, "public_key"); !key.empty()) {
|
||||
e.public_key = key;
|
||||
}
|
||||
rec.entries.push_back(std::move(e));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user