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
commit ab7a9404c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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] || "";