Skip to content

fix: Secure compile endpoint against path traversal and repair broken test#169

Open
Omdeepb69 wants to merge 1 commit intoc2siorg:mainfrom
Omdeepb69:fix/compile-test-coverage
Open

fix: Secure compile endpoint against path traversal and repair broken test#169
Omdeepb69 wants to merge 1 commit intoc2siorg:mainfrom
Omdeepb69:fix/compile-test-coverage

Conversation

@Omdeepb69
Copy link
Copy Markdown

This PR resolves a critical security vulnerability and fixes a broken unit test in the gdbui_server.

Security: Added secure_filename validation to the compile route's name parameter to prevent arbitrary path traversal attacks (e.g. ../../../etc/passwd), immediately rejecting malicious inputs with a 400 Bad Request.

Tests: Removed a flawed self.client.post mock in test_compile_code that completely bypassed the test. Added new coverage for invalid filenames and syntax.

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