fix(security): resolve gitea inventory validator input from repo root
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 17s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 17s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -48,6 +48,7 @@ SECRET_PATTERNS = {
|
||||
"token_assignment": re.compile(r"\btoken\s*[:=]\s*[^,\s]+", re.IGNORECASE),
|
||||
}
|
||||
SECRET_QUERY_KEYS = {"access_token", "auth", "key", "password", "secret", "token"}
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def parse_args() -> argparse.Namespace:
|
||||
@@ -57,7 +58,7 @@ def parse_args() -> argparse.Namespace:
|
||||
parser.add_argument(
|
||||
"--input",
|
||||
type=Path,
|
||||
default=Path("docs/security/gitea-repo-inventory.snapshot.json"),
|
||||
default=ROOT / "docs/security/gitea-repo-inventory.snapshot.json",
|
||||
help="Payload JSON to validate.",
|
||||
)
|
||||
parser.add_argument("--output", type=Path, help="Write validation JSON here.")
|
||||
|
||||
Reference in New Issue
Block a user