Skip to content

Commit

Permalink
updating logic
Browse files Browse the repository at this point in the history
  • Loading branch information
giorod3 committed Dec 2, 2024
1 parent 03a35f2 commit deb7fe4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions helpers/aws/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,11 @@ var getAttachedELBs = function(cache, source, region, resourceId, lbField, lbAt
return elbs;
};

var getApiIdFromArn = function(arn) {
if (!arn) return null;
const matches = arn.match(/arn:aws:execute-api:[^:]+:[^:]+:([^/]+)/);
return matches ? matches[1] : null;
}

Check failure on line 1246 in helpers/aws/functions.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon

Check failure on line 1246 in helpers/aws/functions.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon
var checkNetworkExposure = function(cache, source, subnets, securityGroups, elbs, region, results, resource) {
var internetExposed = '';
var isSubnetPrivate = false;
Expand Down
4 changes: 2 additions & 2 deletions plugins/aws/lambda/lambdaNetworkExposure.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ module.exports = {
var getPolicy = helpers.addSource(cache, source,
['lambda', 'getPolicy', region, lambda.FunctionName]);

let lambda = {
let lambdaResource = {
functionUrlConfig: getFunctionUrlConfig,
functionPolicy: getPolicy
}

Check failure on line 55 in plugins/aws/lambda/lambdaNetworkExposure.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon

Check failure on line 55 in plugins/aws/lambda/lambdaNetworkExposure.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon

let internetExposed = helpers.checkNetworkExposure(cache, source, [], [], [], region, results, lambda);
let internetExposed = helpers.checkNetworkExposure(cache, source, [], [], [], region, results, lambdaResource);

if (internetExposed && internetExposed.length) {
helpers.addResult(results, 2,
Expand Down

0 comments on commit deb7fe4

Please sign in to comment.