@aaa-sentinel/iac-cost 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +14 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6894,6 +6894,15 @@ function httpHint(error2, access) {
|
|
|
6894
6894
|
if (!failure2) return null;
|
|
6895
6895
|
const { stage, status, code: code2 } = failure2;
|
|
6896
6896
|
const creds = `${access.idVar}/${access.secretVar}`;
|
|
6897
|
+
if (status === 403 && code2 === "APP_OWNER_NOT_MEMBER") {
|
|
6898
|
+
return `the person who created the app in ${access.idVar} is no longer a member of the organization: an administrator can reassign the app to another member in ${APPS_URL}, then run the job again.`;
|
|
6899
|
+
}
|
|
6900
|
+
if (status === 403 && code2 === "APP_OWNER_NOT_ACTIVE") {
|
|
6901
|
+
return `the access of the person who created the app in ${access.idVar} is suspended: an administrator can reactivate it or reassign the app in ${APPS_URL}, then run the job again.`;
|
|
6902
|
+
}
|
|
6903
|
+
if (status === 503 && code2 === "OWNER_CHECK_UNAVAILABLE") {
|
|
6904
|
+
return "the API could not check the person who created the app: run the job again in a few minutes.";
|
|
6905
|
+
}
|
|
6897
6906
|
if (stage === "token" && status === 400 && code2 === "INVALID_SCOPE") {
|
|
6898
6907
|
return `the app in ${access.idVar} does not have the ${access.scope} scope: add it to the app in ${APPS_URL} (or create an app with it and update ${creds}), then run the job again.`;
|
|
6899
6908
|
}
|
|
@@ -13337,6 +13346,9 @@ function publicVulnerable(input, provider) {
|
|
|
13337
13346
|
}
|
|
13338
13347
|
|
|
13339
13348
|
// ../../services/security/src/rules/aws/combos.ts
|
|
13349
|
+
function rdsInstanceIdOf(resourceId) {
|
|
13350
|
+
return /^arn:aws[a-z-]*:rds:[a-z0-9-]+:\d{12}:db:([^:]+)$/.exec(resourceId)?.[1] ?? resourceId;
|
|
13351
|
+
}
|
|
13340
13352
|
function lambdaRef(resourceId, region) {
|
|
13341
13353
|
const partes = resourceId.split(":");
|
|
13342
13354
|
if (partes[0] === "arn" && partes[2] === "lambda" && partes[5] === "function" && partes[3] && partes[6]) {
|
|
@@ -13415,7 +13427,7 @@ var AWS_SECURITY_COMBOS = [
|
|
|
13415
13427
|
costRule: "DATABASE_ZERO_CONN_RDS",
|
|
13416
13428
|
// Los dos módulos usan el DBInstanceIdentifier, único por región.
|
|
13417
13429
|
findingKey: (f) => `${f.region}::${f.resourceId}`,
|
|
13418
|
-
signalKey: (s) => `${s.region}::${s.resourceId}`,
|
|
13430
|
+
signalKey: (s) => `${s.region}::${rdsInstanceIdOf(s.resourceId)}`,
|
|
13419
13431
|
amount: true
|
|
13420
13432
|
})
|
|
13421
13433
|
},
|
|
@@ -13431,7 +13443,7 @@ var AWS_SECURITY_COMBOS = [
|
|
|
13431
13443
|
rule: "SEC_AWS_PATCHING_RDS_SIN_ACTUALIZACION_MENOR",
|
|
13432
13444
|
costRule: "DATABASE_RDS_EXTENDED_SUPPORT",
|
|
13433
13445
|
findingKey: (f) => `${f.region}::${f.resourceId}`,
|
|
13434
|
-
signalKey: (s) => `${s.region}::${s.resourceId}`,
|
|
13446
|
+
signalKey: (s) => `${s.region}::${rdsInstanceIdOf(s.resourceId)}`,
|
|
13435
13447
|
amount: true
|
|
13436
13448
|
// El aviso de «entra en soporte extendido en ≤60 días» lleva importe 0: aún no se paga nada.
|
|
13437
13449
|
}).filter((m) => typeof m.evidence["monthlySavingsUsd"] === "number" && m.evidence["monthlySavingsUsd"] > 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aaa-sentinel/iac-cost",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Estimate the monthly cost delta of a Terraform plan, check it against the AAA Sentinel security rules, open security fixes as pull requests and report how the security posture changed, from your CI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|