Skip to content

Conversation

@bram-star-app
Copy link

@bram-star-app bram-star-app bot commented Aug 25, 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 Replaced full path disclosure in error response with a generic error message to prevent information leakage.
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 only, preventing unauthorized access.
Full Path Disclosure DELETE /api/file src/file/file.controller.ts, src/file/file.service.ts Implement error handling in the deleteFile method to prevent full path disclosure by returning generic error messages to the client.
Unvalidated Redirect GET /api/goto src/app.controller.ts Implemented URL validation in the redirect method to prevent unvalidated redirects by checking against an allowlist of trusted hosts.
Server Side Request Forgery GET /api/file/digital_ocean src/file/file.service.ts Restrict access to internal metadata IPs by removing them from the allowed hosts list.
Secret Tokens Leak GET /api/secrets src/app.controller.ts Refactor the getSecrets method to retrieve secrets from a secure source, such as environment variables, instead of hardcoding them in the source code.
[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 Escape user input before rendering templates to prevent Server Side Template Injection.
Broken JWT Authentication POST /api/testimonials src/auth/jwt/jwt.token.processor.ts The JWT parsing logic now throws an error if the 'none' algorithm is detected, preventing insecure token acceptance.
GraphQL Introspection POST /graphql src/app.module.ts Disabled GraphQL introspection to prevent schema exposure.
Database Error Message Disclosure POST /graphql src/testimonials/testimonials.resolver.ts, src/testimonials/testimonials.service.ts Replaced detailed error messages with a generic error message to prevent database error message disclosure.
XPATH Injection GET /api/partners/searchPartners src/partners/partners.service.ts Sanitize and validate XPath expressions before use to prevent injection.
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 5 vulnerabilities.
  • Cleanup Irrelevant Test Files: 11 files removed.
  • Applying Security Fixes: Generated 5 security fixes.
  • E2E Security Tests Execution: Found 4 vulnerabilities.
  • Cleanup Irrelevant Test Files: 1 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