Merge pull request #665 from step-security/fix/use-policy-store-default-audit

Default to audit mode when api-key missing with use-policy-store
This commit is contained in:
Varun Sharma
2026-05-14 14:29:51 -07:00
committed by GitHub
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -85848,7 +85848,8 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
if (confg.use_policy_store) {
console.log(`Fetching policy from policy store`);
if (confg.api_key === "") {
lib_core.setFailed("api-key is required when use-policy-store is set to true");
lib_core.warning("api-key is not set while use-policy-store is true. Defaulting to audit mode.");
confg.egress_policy = "audit";
}
else {
try {
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -107,7 +107,10 @@ interface MonitorResponse {
if (confg.use_policy_store) {
console.log(`Fetching policy from policy store`);
if (confg.api_key === "") {
core.setFailed("api-key is required when use-policy-store is set to true");
core.warning(
"api-key is not set while use-policy-store is true. Defaulting to audit mode."
);
confg.egress_policy = "audit";
} else {
try {
const repoName = (process.env["GITHUB_REPOSITORY"] || "").split("/")[1] || "";