1
0
Fork 0
mirror of synced 2026-06-05 11:15:14 +00:00

Default to audit mode when api-key missing with use-policy-store

This commit is contained in:
Varun Sharma 2026-05-14 14:11:04 -07:00
commit ec41b783c2
No known key found for this signature in database
3 changed files with 7 additions and 3 deletions

3
dist/pre/index.js vendored
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 {

File diff suppressed because one or more lines are too long

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] || "";