Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serverless CLI has a number of potential security flaws as identified by a VeraCode static scan #15

Open
iamle0pard opened this issue Jun 19, 2020 · 0 comments

Comments

@iamle0pard
Copy link

If you run a VeraCode static security scan against the serverless folder and files within 'node_modules' you will see that there are a number of flaws identified.

Currently using serverless version: 1.72.0

Please note that VeraCode often finds the word "pass" or "secret" and assumes those are hard coded values of real passwords. I am filing this so you are aware of the issue(s) and can fix them, if needed. If they are false positives, please let me know so I can triage any issues in our scan results identified as such.

I'm not saying all of these issues are 100% true security issues. I am simply reporting what VeraCode has indicated. What you will find is that many times their algorithm only looks for keywords and then flags it. For instance anywhere the word 'Secret', 'Pass', or 'Password' are in the code it will flags as 'Use of Hard-coded Password'. In 99% of the cases this is a false positive. There may be many more like this.

Since it is a static code analysis done by their internal AI/algorithms it doesn't have the ability to process the preceding lines to see if the flagged line number is actually being protected by code that precedes it. I believe they error on the side of "flag it and then let the end user determine if it is a true issue or a false positive".

I'm just reporting these items as a notification to everyone on the project. If it is determined that there are no real security issues, then that is great! Internally I can flag them in our own VeraCode scan report as such to remove them from the results. We do this to ensure we don't ship code that has vulnerabilities in it, so that is also why I'm reporting it; if one of these was an actual security issue, it would be good to get it fixed.

Here are the specific files (with paths and code at that line number) for each item they reported:

http://cwe.mitre.org/data/definitions/259.html
CWE-259: Use of Hard-coded Password

/cli/src/Context.js: 124
providers.tencent.TENCENT_SECRET_KEY = 'SecretKey'

/cli/src/Context.js: 123
providers.tencent.TENCENT_SECRET_ID = 'SecretId'

/cli/src/Context.js: 110
providers.aws.AWS_SECRET_ACCESS_KEY = 'secretAccessKey'

/cli/src/Context.js: 129
providers.docker.DOCKER_PASSWORD = 'password'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant