Skip to content

feat: discover routes from OpenAPI spec files when Noir fallback is used#40

Open
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
jules-openapi-fallback-12011950927894770504
Open

feat: discover routes from OpenAPI spec files when Noir fallback is used#40
google-labs-jules[bot] wants to merge 1 commit into
mainfrom
jules-openapi-fallback-12011950927894770504

Conversation

@google-labs-jules

Copy link
Copy Markdown

What:
Adds an OpenAPI fallback extractor that scans JSON, YAML, and YML files for OpenAPI/Swagger definitions. When Noir is absent or falls back, this new logic parses these spec files and extracts HTTP methods and routes (either via direct JSON parsing or line-by-line regex parsing for YAML).

Why:
VAmPI tests were failing because endpoints didn't match the required 10 endpoints due to missing Noir OpenAPI handling. The websec proof score regressed to 8/10 as a result.

Risk:
Low. The fallback is wrapped in try/except blocks to prevent crashes on malformed files and is gated behind _fallback processing.

Tests:
Includes two new regression tests in tests/test_pentest_regressions.py to assert extraction works for both JSON and YAML OpenAPI files. Also fixes a test regression in test_hooks.py by enforcing local git hooks usage during the test.


PR created automatically by Jules for task 12011950927894770504 started by @raccioly

This commit introduces a new fallback mechanism to discover routes from OpenAPI specifications (both JSON and YAML formats) when the Noir scanner is not present or fails to identify routes. It resolves an issue where repositories with OpenAPI-first specifications (like VAmPI) would report 0 endpoints without Noir.

Also includes a test regression fix to `tests/test_hooks.py` by ensuring tests run with a local git hooks path.
@google-labs-jules

Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

0 participants