Reputation: 43
We created a test Typescript with an obvious code vulnerability (hardcoded credentials). AWS Lambda doesn't support Typescript so we transpile it to be Javascript. We then export our zipped build file to a Lambda function, when testing in Lambda, it runs, however Amazon Inspector doesn't seem to detect the code vulnerability.
What could be the reason behind this? Is anyone here experiencing the same issue with us? How did you make it work, or a work-around?
Upvotes: 0
Views: 174
Reputation: 887
Amazon Inspector is a tool designed to analyze the security of your applications deployed on AWS. However, it might not always detect all types of vulnerabilities, especially those related to code specifics like hardcoded credentials. Here are some reasons why Amazon Inspector might not be detecting the hardcoded credentials in your Lambda function:
Possible Solutions and Workarounds Here are some steps you can take to address this issue and ensure your Lambda function code is secure:
Use Specialized Code Scanners: Use specialized static code analysis tools designed for identifying code vulnerabilities, such as:
Manual Code Reviews: Conduct regular manual code reviews to ensure that no hardcoded credentials or other security vulnerabilities exist in your code.
Secrets Management: Use AWS Secrets Manager or AWS Systems Manager Parameter Store to manage and securely access secrets and credentials in your Lambda functions, rather than hardcoding them in your source code.
Security Best Practices: Follow security best practices for serverless applications, such as:
Lambda Layers: Use Lambda Layers to separate dependencies and secrets from your main code, allowing for better management and security practices.
Upvotes: 1