Skip to content

Conversation

@bram-star-app
Copy link

@bram-star-app bram-star-app bot commented Aug 28, 2025

Note

Fixed 13 of 17 vulnerabilities.
Please review the fixes before merging.

Vulnerability Endpoint Affected Files Resolution
Full Path Disclosure GET /api/auth/jwt/kid-sql/validate src/auth/auth.guard.ts Removed file path information from error responses to prevent full path disclosure.
Broken JWT Authentication GET /api/auth/jwt/rsa/signature/validate src/auth/jwt/jwt.token.with.rsa.signature.keys.processor.ts Enforce the RS256 algorithm during JWT validation to prevent accepting tokens with a 'None' algorithm.
Server Side Request Forgery GET /api/file/aws src/file/file.service.ts Added hostname validation to restrict server-side requests to a whitelist of allowed hosts.
Server Side Request Forgery GET /api/file/azure src/file/cloud.providers.metadata.ts Restrict server-side requests to known cloud provider metadata URLs to prevent SSRF attacks.
Server Side Request Forgery GET /api/file/digital_ocean src/file/file.service.ts Removed '169.254.169.254' from the list of allowed hosts to prevent unauthorized access to internal resources.
XPATH Injection GET /api/partners/searchPartners src/partners/partners.service.ts Sanitize XPath expressions to prevent injection by allowing only safe characters.
Secret Tokens Leak GET /api/secrets src/app.controller.ts Replaced hardcoded secret tokens with environment variables to prevent leaks.
[BL] ID Enumeration GET /api/users/id/1 src/users/users.controller.ts Added authorization checks to ensure users can only access their own data by verifying the email from the JWT token against the requested user ID.
Server Side Template Injection POST /api/render src/app.controller.ts Escaped user input in the template rendering function to prevent Server Side Template Injection.
GraphQL Introspection POST /graphql src/app.module.ts Disabled GraphQL introspection and GraphiQL interface to prevent schema exposure.
SQL Injection POST /graphql src/products/products.resolver.ts, src/products/products.service.ts Replaced dynamic SQL query construction with parameterized queries to prevent SQL injection.
Unvalidated Redirect GET /api/goto src/app.controller.ts The redirect method now validates the URL against an allowlist of domains to prevent unvalidated redirects.
Broken JWT Authentication POST /api/testimonials src/auth/jwt/jwt.token.processor.ts Enforced JWT algorithm validation by rejecting tokens with 'none' algorithm.
Workflow execution details
  • Repository Analysis: TypeScript, NestJS
  • Entrypoints Discovery: 73 entrypoints
  • Attack Vectors Identification
  • E2E Security Tests Generation: 73 test files created
  • E2E Security Tests Execution: Found 17 vulnerabilities.
  • Cleanup Irrelevant Test Files: 57 files removed.
  • Applying Security Fixes: Generated 17 security fixes.
  • E2E Security Tests Execution: Found 6 vulnerabilities.
  • Cleanup Irrelevant Test Files: 10 files removed.
  • Applying Security Fixes: Generated 6 security fixes.
  • E2E Security Tests Execution: Found 4 vulnerabilities.
  • Cleanup Irrelevant Test Files: 2 files removed.
  • Applying Security Fixes: Generated 4 security fixes.
  • E2E Security Tests Execution: Found 4 vulnerabilities.
  • Cleanup Irrelevant Test Files: 0 files removed.
  • Applying Security Fixes: Generated 4 security fixes.
  • E2E Security Tests Execution: Found 4 vulnerabilities.
  • Cleanup Irrelevant Test Files: 0 files removed.
  • Applying Security Fixes: Generated 4 security fixes.
  • E2E Security Tests Execution: Found 4 vulnerabilities.
  • Workflow Wrap-Up

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

Successfully merging this pull request may close these issues.

1 participant