Skip to content

Conversation

@bram-star-app
Copy link

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

Note

Fixed 18 of 22 vulnerabilities.
Please review the fixes before merging.

Vulnerability Endpoint Affected Files Resolution
Broken JWT Authentication DELETE /api/users/one/1/photo src/auth/auth.service.ts Enforced JWT algorithm validation by checking processor type before token validation.
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/file.service.ts Removed '169.254.169.254' from the list of allowed hosts to prevent SSRF attacks.
Full Path Disclosure DELETE /api/file src/file/file.controller.ts, src/file/file.service.ts Implemented error handling in the deleteFile method to prevent full path disclosure by returning generic error messages to the client.
Server Side Request Forgery GET /api/file src/file/file.service.ts Restrict server-side requests to a whitelist of allowed hosts to prevent SSRF attacks.
Local File Inclusion GET /api/file src/file/file.service.ts Added path validation to prevent directory traversal by ensuring file paths are within a specific allowed directory.
Full Path Disclosure GET /api/file src/file/file.controller.ts, src/file/file.service.ts Implemented error handling to prevent full path disclosure by returning generic error messages to the client while logging detailed errors on the server.
Server Side Request Forgery GET /api/file/digital_ocean src/file/cloud.providers.metadata.ts Restrict server-side requests to only known and allowed cloud provider metadata URLs, preventing SSRF attacks.
Server Side Request Forgery GET /api/file/google src/file/file.service.ts Added path validation to ensure only allowed metadata paths are accessed, preventing SSRF.
XPATH Injection GET /api/partners/searchPartners src/partners/partners.service.ts Sanitize XPath input to prevent injection by allowing only safe characters.
Secret Tokens Leak GET /api/secrets src/app.controller.ts Store secret tokens in 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 check 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 to prevent Server Side Template Injection.
Broken JWT Authentication POST /api/testimonials src/auth/jwt/jwt.token.processor.ts Added a check to prevent JWT tokens with 'none' algorithm from being processed.
GraphQL Introspection POST /graphql src/app.module.ts Disabled GraphQL introspection in the server configuration to prevent schema exposure.
Database Error Message Disclosure POST /graphql src/testimonials/testimonials.service.ts Replace detailed database error messages with a generic error message to prevent information leakage.
Full Path Disclosure GET /api/auth/jwt/kid-sql/validate src/components/global-exception.filter.ts Sanitize error responses to remove file path information, ensuring only generic error messages are exposed to users.
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.
Workflow execution details
  • Repository Analysis: TypeScript, NestJS
  • Entrypoints Discovery: 72 entrypoints
  • Attack Vectors Identification
  • E2E Security Tests Generation: 72 test files created
  • E2E Security Tests Execution: Found 22 vulnerabilities.
  • Cleanup Irrelevant Test Files: 53 files removed.
  • Applying Security Fixes: Generated 22 security fixes.
  • E2E Security Tests Execution: Found 6 vulnerabilities.
  • Cleanup Irrelevant Test Files: 13 files removed.
  • Applying Security Fixes: Generated 6 security fixes.
  • E2E Security Tests Execution: Found 5 vulnerabilities.
  • Cleanup Irrelevant Test Files: 1 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.
  • 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