-
Notifications
You must be signed in to change notification settings - Fork 3
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
Vulnerabilities Dashboard - Code #153
Comments
New code security updates for commit 4295347
See DetailsNew Findings
|
New code security updates for commit 8cf905a
See DetailsNew Findings
|
New code security updates for commit 6c8292b
See DetailsNew Findings
|
New code security updates for commit d565c70
See DetailsNew Findings
|
New code security updates for commit 2093c4d
See DetailsNew Findings
|
New code security updates for commit 5496e45
See DetailsNew Findings
|
New code security updates for commit 3ffcee7
See DetailsNew Findings
|
New code security updates for commit e98cdf4
See DetailsNew Findings
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
Severity Threshold: π΅ MEDIUM
29 Potential vulnerability sources found within this repo
π΄ CRITICAL
π‘ HIGH
π΅ MEDIUM
βͺ LOW
ID: 01J7P1X7TZE89D7QCEV1EMDF7M
Language: TypeScript
Severity: π‘ HIGH
CWE-798
Node secret
A hardcoded secret is identified. Store it properly in an environment variable.
flatfile-core-libraries/packages/cli/src/index.ts
Lines 112 to 120 in 1ab100d
ID: 01J7P1X7TZE89D7QCF0KEPH032
Language: TypeScript
Severity: π‘ HIGH
CWE-918
Rules lgpl javascript ssrf rule node ssrf
This application allows user-controlled URLs to be passed directly to HTTP client libraries.
This can result in Server-Side Request Forgery (SSRF).
SSRF refers to an attack where the attacker can abuse functionality on
the server to force it to make requests to other internal systems within your
infrastructure that are not directly exposed to the internet.
This allows the attacker to access internal resources they do not have direct access to.
Some risks of SSRF are:
To avoid this, try using hardcoded HTTP request calls or a whitelisting object to
check whether the user input is trying to access allowed resources or not.
Here is an example:
For more information on SSRF see OWASP:
https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html
flatfile-core-libraries/packages/listener/src/events/authenticated.client.ts
Line 39 in 1ab100d
ID: 01J7P1X7TZE89D7QCEV6JG659B
Language: TypeScript
Severity: π‘ HIGH
CWE-798
Node api key
A hardcoded API Key is identified. Store it properly in an environment variable.
flatfile-core-libraries/packages/cli/src/legacy/utilities/access.token.ts
Lines 5 to 6 in 1ab100d
ID: 01JCRPQ87C2BGT6A3M56JZPHDH
Language: JavaScript
Severity: π‘ HIGH
CWE-918
Server-Side Request Forgery (SSRF)
User controlled URL in http client libraries can result in Server Side Request Forgery (SSRF).
Read more:
https://cwe.mitre.org/data/definitions/918.html
flatfile-core-libraries/packages/cli/src/x/files/agent.js
Lines 311 to 323 in 1ab100d
ID: 01JCRPQ87C2BGT6A3M54J579F1
Language: JavaScript
Severity: π‘ HIGH
CWE-918
Server-Side Request Forgery (SSRF)
User controlled URL in http client libraries can result in Server Side Request Forgery (SSRF).
Read more:
https://cwe.mitre.org/data/definitions/918.html
flatfile-core-libraries/packages/cli/src/x/files/agent.js
Lines 294 to 297 in 1ab100d
ID: 01J7P1X7TZE89D7QCEV4QD20AK
Language: TypeScript
Severity: π‘ HIGH
CWE-798
Node secret
A hardcoded secret is identified. Store it properly in an environment variable.
flatfile-core-libraries/packages/cli/src/index.ts
Lines 132 to 137 in 1ab100d
ID: 01JC3VWCMTQ46DA9ZEWZTZ5DHB
Language: TypeScript
Severity: π‘ HIGH
CWE-918
Rules lgpl javascript ssrf rule node ssrf
This application allows user-controlled URLs to be passed directly to HTTP client libraries.
This can result in Server-Side Request Forgery (SSRF).
SSRF refers to an attack where the attacker can abuse functionality on
the server to force it to make requests to other internal systems within your
infrastructure that are not directly exposed to the internet.
This allows the attacker to access internal resources they do not have direct access to.
Some risks of SSRF are:
To avoid this, try using hardcoded HTTP request calls or a whitelisting object to
check whether the user input is trying to access allowed resources or not.
Here is an example:
For more information on SSRF see OWASP:
https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html
flatfile-core-libraries/packages/configure/src/utils/authenticated.client.ts
Line 42 in 1ab100d
ID: 01J7P1X7TZE89D7QCEWA63MMCS
Language: TypeScript
Severity: π΅ MEDIUM
CWE-22
Javascript pathtraversal rule non literal fs filename
The application dynamically constructs file or path information. If the path
information comes from user-supplied input, it could be abused to read sensitive files,
access other users' data, or aid in exploitation to gain further system access.
User input should never be used in constructing paths or files for interacting
with the filesystem. This includes filenames supplied by user uploads or downloads.
If possible, consider hashing user input or using unique values and
use
path.normalize
to resolve and validate the path informationprior to processing any file functionality.
Example using
path.normalize
and not allowing direct user input:For more information on path traversal issues see OWASP:
https://owasp.org/www-community/attacks/Path_Traversal
flatfile-core-libraries/packages/cli/src/x/actions/develop.action.ts
Line 25 in 1ab100d
ID: 01J6DH83ZZ97W0Y727MT5NP4E2
Language: TypeScript
Severity: π΅ MEDIUM
CWE-22
Javascript pathtraversal rule non literal fs filename
The vulnerability is a potential path traversal issue in the file 'packages/cli/src/x/actions/publish.pubsub.ts'. On line 141, the code uses
path.join(outDir, 'build.js')
to create a file path. If 'outDir' is user-controlled or externally provided without proper sanitization, it could potentially be manipulated to access files outside the intended directory.flatfile-core-libraries/packages/cli/src/x/actions/publish.pubsub.ts
Line 141 in 1ab100d
ID: 01J6DH83ZZ97W0Y727SQ3BM945
Language: TypeScript
Severity: π΅ MEDIUM
CWE-185
Javascript dos rule non literal regexp
The testRegex function in util.ts uses a RegExp constructor with non-literal values (regexString and flags). This practice can lead to Regular Expression Denial of Service (ReDoS) attacks if an attacker can control the input for these parameters. ReDoS occurs when a maliciously crafted regular expression takes an excessive amount of time to process, potentially causing the application to become unresponsive.
flatfile-core-libraries/packages/v2-shims/src/logic/util.ts
Line 54 in 1ab100d
ID: 01J7P1X7TZE89D7QCF08QKMF13
Language: TypeScript
Severity: π΅ MEDIUM
CWE-185
Javascript dos rule non literal regexp
The
RegExp
constructor was called with a non-literal value. If an adversary were able tosupply a malicious regex, they could cause a Regular Expression Denial of Service (ReDoS)
against the application. In Node applications, this could cause the entire application to no
longer be responsive to other users' requests.
To remediate this issue, never allow user-supplied regular expressions. Instead, the regular
expression should be hardcoded. If this is not possible, consider using an alternative regular
expression engine such as node-re2. RE2 is a safe alternative
that does not support backtracking, which is what leads to ReDoS.
Example using re2 which does not support backtracking (Note: it is still recommended to
never use user-supplied input):
For more information on Regular Expression DoS see:
flatfile-core-libraries/packages/javascript/src/i18n.ts
Lines 54 to 57 in 1ab100d
ID: 01J7P1X7TZE89D7QCEWATXA2B2
Language: TypeScript
Severity: π΅ MEDIUM
CWE-22
Javascript pathtraversal rule non literal fs filename
The application dynamically constructs file or path information. If the path
information comes from user-supplied input, it could be abused to read sensitive files,
access other users' data, or aid in exploitation to gain further system access.
User input should never be used in constructing paths or files for interacting
with the filesystem. This includes filenames supplied by user uploads or downloads.
If possible, consider hashing user input or using unique values and
use
path.normalize
to resolve and validate the path informationprior to processing any file functionality.
Example using
path.normalize
and not allowing direct user input:For more information on path traversal issues see OWASP:
https://owasp.org/www-community/attacks/Path_Traversal
flatfile-core-libraries/packages/cli/src/x/actions/develop.action.ts
Line 26 in 1ab100d
ID: 01J6E93M4Q6Y9PTH07ES48T3NX
Language: TypeScript
Severity: π΅ MEDIUM
CWE-209
Generic error disclosure
The vulnerability is a generic error disclosure in the PubNub listener's message handling function. When an error occurs during message processing, the entire error object is logged using console.error(e). This can potentially expose sensitive information about the application's internal structure, dependencies, and possibly even sensitive data if it's included in the error object. The vulnerability is triggered by any error in the message handling process, which doesn't require special privileges or user interaction to exploit.
flatfile-core-libraries/packages/listener-driver-pubsub/src/index.ts
Lines 70 to 84 in 1ab100d
ID: 01J6E93M4Q6Y9PTH07ASDH1MSY
Language: TypeScript
Severity: π΅ MEDIUM
CWE-95
Javascript require rule non literal require
The application was found to dynamically import a module by calling
require
using anon-literal string. An adversary might be able to read the first line of
arbitrary files. If they had write access to the file system, they may also be able to
execute arbitrary code.
To remediate this issue, use a hardcoded string literal when calling
require
. Never call itit with dynamically created variables or user-supplied data.
flatfile-core-libraries/packages/cli/src/x/actions/develop.action.ts
Line 99 in 1ab100d
ID: 01J6DH83ZZ97W0Y727K24R83ED
Language: TypeScript
Severity: π΅ MEDIUM
CWE-95
Javascript require rule non literal require
The vulnerability exists in the
sendSchemasToServer
function where a non-literal require is used:const config = require(buildFile).default
. This allows dynamic loading of modules based on thebuildFile
parameter, which could be manipulated by an attacker to read arbitrary files or potentially execute malicious code.flatfile-core-libraries/packages/cli/src/legacy/utilities/send.schemas.to.server.ts
Line 17 in 1ab100d
ID: 01J7P1X7TZE89D7QCEVH26DFV8
Language: TypeScript
Severity: π΅ MEDIUM
CWE-22
Javascript pathtraversal rule non literal fs filename
The application dynamically constructs file or path information. If the path
information comes from user-supplied input, it could be abused to read sensitive files,
access other users' data, or aid in exploitation to gain further system access.
User input should never be used in constructing paths or files for interacting
with the filesystem. This includes filenames supplied by user uploads or downloads.
If possible, consider hashing user input or using unique values and
use
path.normalize
to resolve and validate the path informationprior to processing any file functionality.
Example using
path.normalize
and not allowing direct user input:For more information on path traversal issues see OWASP:
https://owasp.org/www-community/attacks/Path_Traversal
flatfile-core-libraries/packages/cli/src/shared/get-entry-file.ts
Line 16 in 1ab100d
ID: 01J6E93M4Q6Y9PTH079XESQY5R
Language: TypeScript
Severity: π΅ MEDIUM
CWE-22
Javascript pathtraversal rule non literal fs filename
This is a path traversal vulnerability in the CLI tool's 'send.schemas.to.server.ts' file. The vulnerable code uses fs.readFileSync(buildFile, 'utf8') without proper input validation on the 'buildFile' parameter. This could allow an attacker with local access to read arbitrary files on the system, potentially exposing sensitive information.
flatfile-core-libraries/packages/cli/src/legacy/utilities/send.schemas.to.server.ts
Line 58 in 1ab100d
ID: 01J7P1X7TZE89D7QCEVX77BG8P
Language: TypeScript
Severity: π΅ MEDIUM
CWE-22
Javascript pathtraversal rule non literal fs filename
The application dynamically constructs file or path information. If the path
information comes from user-supplied input, it could be abused to read sensitive files,
access other users' data, or aid in exploitation to gain further system access.
User input should never be used in constructing paths or files for interacting
with the filesystem. This includes filenames supplied by user uploads or downloads.
If possible, consider hashing user input or using unique values and
use
path.normalize
to resolve and validate the path informationprior to processing any file functionality.
Example using
path.normalize
and not allowing direct user input:For more information on path traversal issues see OWASP:
https://owasp.org/www-community/attacks/Path_Traversal
flatfile-core-libraries/packages/cli/src/x/actions/deploy.action.ts
Line 133 in 1ab100d
ID: 01J7P1X7TZE89D7QCEVC9NNR97
Language: TypeScript
Severity: π΅ MEDIUM
CWE-22
Javascript pathtraversal rule non literal fs filename
The application dynamically constructs file or path information. If the path
information comes from user-supplied input, it could be abused to read sensitive files,
access other users' data, or aid in exploitation to gain further system access.
User input should never be used in constructing paths or files for interacting
with the filesystem. This includes filenames supplied by user uploads or downloads.
If possible, consider hashing user input or using unique values and
use
path.normalize
to resolve and validate the path informationprior to processing any file functionality.
Example using
path.normalize
and not allowing direct user input:For more information on path traversal issues see OWASP:
https://owasp.org/www-community/attacks/Path_Traversal
flatfile-core-libraries/packages/cli/src/legacy/utilities/send.schemas.to.server.ts
Line 30 in 1ab100d
ID: 01J7P1X7TZE89D7QCEWR97149Y
Language: TypeScript
Severity: π΅ MEDIUM
CWE-95
Javascript require rule non literal require
The application was found to dynamically import a module by calling
require
using anon-literal string. An adversary might be able to read the first line of
arbitrary files. If they had write access to the file system, they may also be able to
execute arbitrary code.
To remediate this issue, use a hardcoded string literal when calling
require
. Never call itit with dynamically created variables or user-supplied data.
flatfile-core-libraries/packages/cli/src/x/actions/publish.pubsub.ts
Line 143 in 1ab100d
βΉοΈ Note: 29 vulnerabilities were detected. This dashboard prioritises and showcases the top 20 most critical findings.
Reply with
/nullify
to interact with me like another developerThe text was updated successfully, but these errors were encountered: