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

validator: company #623

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

relocating

4446375
Select commit
Loading
Failed to load commit list.
Draft

validator: company #623

relocating
4446375
Select commit
Loading
Failed to load commit list.
flatfile-nullify / Nullify Code succeeded Oct 4, 2024 in 1m 45s

Nullify Code

Severity Threshold: 🔵 MEDIUM

2 Potential vulnerability sources found within this repo

🔴 CRITICAL 🟡 HIGH 🔵 MEDIUM ⚪ LOW
0 1 1 0

ID: 01J9CX895ER28XS6DP8A7VY6AY 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:

  • Access and manipulation of internal databases, APIs, or administrative panels - Ability to scan internal network architecture and services - Can be used to pivot attacks into the internal network - Circumvent network segregation and firewall rules
    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: var whitelist = [ "https://example.com", "https://example.com/sample" ] app.get('/ssrf/node-ssrf/axios/safe/3', function (req, res) { if(whitelist.includes(req.query.url)){ axios.get(url, {}) .then(function (response) { console.log(response); }) .catch(function (response) { console.log(response); }) } }); For more information on SSRF see OWASP: https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html

const response = await fetch(
`https://api.einverification.com/verify/${ein}`, //TODO: find a working API
{
headers: { Authorization: `Bearer ${apiKey}` },
}
)

ID: 01J9CX895ER28XS6DP8E5YACKR Language: TypeScript Severity: 🔵 MEDIUM CWE-209

Generic error disclosure

Error messages with stack traces may expose sensitive information about the application.

try {
const secrets = await api.secrets.list({ spaceId, environmentId })
return secrets.data.find((secret) => secret.name === name)?.value
} catch (e) {
console.error(e, `Error fetching secret ${name}`)
}