feat(tracer): add endpoint discovery for flask#14382
feat(tracer): add endpoint discovery for flask#14382christophe-papazian merged 5 commits intomainfrom
Conversation
|
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 265 ± 2 ms. The average import time from base is: 268 ± 2 ms. The import time difference between this PR and base is: -2.53 ± 0.08 ms. Import time breakdownThe following import paths have appeared:
|
Performance SLOsCandidate: christophe-papazian/endpoint_discovery_for_flask (60502ce) 🔵 No Baseline Data (24 suites)🔵 coreapiscenario - 12/12 (2 unstable)🔵 No baseline data available for this suite
|
Following #14113, this PR adds endpoint discovery at startup for Flask. Also: - add blueprints in Flask testing app for threat tests (to make sure blueprints are properly supported) - Improve endpoint discovery test to ensure that we get the expected endpoint reported - Moved endpoint_collection away from asm settings to neutral file endpoints as this is a feature not directly related to security. - Kept flag enabling/disabling this feature inside asm settings as security team will maintain this feature. This was also tested on new endpoint discovery system tests. APPSEC-58374 ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Waiting for #14382 to be merged first [DONE] Following #14113, this PR adds endpoint discovery at startup for FastAPI. Also: - add response_body_type and response_status_code to the possible reports, as fastapi can provides those information in the endpoint definition. - enable threat tests for fastapi endpoint collection. This PR was also tested with system tests for endpoint discovery (DataDog/system-tests#5127 will be merged after this one.) APPSEC-58374 ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Co-authored-by: Julio Gonzalez <107922352+hoolioh@users.noreply.github.com>
Following #14113, this PR adds endpoint discovery at startup for Flask.
Also:
This was also tested on new endpoint discovery system tests.
APPSEC-58374
Checklist
Reviewer Checklist