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:
Vendored
+2
-1
@@ -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 {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+4
-1
@@ -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] || "";
|
||||
|
||||
Reference in New Issue
Block a user