Skip to content

Conversation

@bram-star-app
Copy link

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

Note

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

Vulnerability Endpoint Affected Files Resolution
Broken JWT Authentication GET /api/auth/jwt/rsa/signature/validate src/auth/jwt/jwt.token.with.rsa.signature.keys.processor.ts Enforce RS256 algorithm verification in JWT validation to prevent None algorithm attacks.
Server Side Request Forgery GET /api/file/aws src/file/cloud.providers.metadata.ts Added URL protocol validation to prevent SSRF by ensuring only HTTP/HTTPS protocols are allowed.
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.
Local File Inclusion GET /api/file src/file/file.service.ts Implemented a whitelist validation for file paths to prevent unauthorized file access.
Server Side Request Forgery GET /api/file src/file/cloud.providers.metadata.ts Added path validation to ensure requests to cloud provider metadata URLs are restricted to known paths, preventing unauthorized access.
Full Path Disclosure GET /api/file src/file/file.controller.ts Implemented error handling to prevent full path disclosure by returning generic error messages to the client.
Server Side Request Forgery GET /api/file/digital_ocean src/file/cloud.providers.metadata.ts Added URL validation to ensure only whitelisted cloud provider URLs are accessed, preventing SSRF.
Server Side Request Forgery GET /api/file/google src/file/cloud.providers.metadata.ts Added URL validation to ensure only whitelisted cloud provider metadata URLs are accessed, preventing SSRF attacks.
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.service.ts, src/app.controller.ts Secret tokens are now retrieved from environment variables using ConfigService, ensuring they are not hardcoded in the source code.
[BL] ID Enumeration GET /api/users/id/1 src/users/users.service.ts, src/users/users.controller.ts Added authorization checks to ensure users can only access their own data by verifying the user ID against the authenticated user's ID.
Server Side Template Injection POST /api/render src/app.controller.ts Escaped user input in the renderTemplate method 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 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.
Secret Tokens Leak GET /api/config src/app.service.ts Sensitive information such as database credentials and API keys are now redacted from the response to prevent leaks.
GraphQL Introspection POST /graphql src/app.module.ts Disabled GraphQL introspection and added validation rules to block introspection queries.
Workflow execution details
  • Repository Analysis: TypeScript, NestJS
  • Entrypoints Discovery: 71 entrypoints
  • Attack Vectors Identification
  • E2E Security Tests Generation: 71 test files created
  • E2E Security Tests Execution: Found 19 vulnerabilities.
  • Cleanup Irrelevant Test Files: 55 files removed.
  • Applying Security Fixes: Generated 19 security fixes.
  • E2E Security Tests Execution: Found 4 vulnerabilities.
  • Cleanup Irrelevant Test Files: 12 files removed.
  • Applying Security Fixes: Generated 4 security fixes.
  • E2E Security Tests Execution: Found 3 vulnerabilities.
  • Cleanup Irrelevant Test Files: 1 files removed.
  • Applying Security Fixes: Generated 3 security fixes.
  • E2E Security Tests Execution: Found 2 vulnerabilities.
  • Cleanup Irrelevant Test Files: 1 files removed.
  • Applying Security Fixes: Generated 2 security fixes.
  • E2E Security Tests Execution: Found 2 vulnerabilities.
  • Cleanup Irrelevant Test Files: 0 files removed.
  • Applying Security Fixes: Generated 2 security fixes.
  • E2E Security Tests Execution: Found 2 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