Skip to content

Remove unused ddtrace appsec packages#761

Merged
avara1986 merged 3 commits intomainfrom
avara1986-patch-1
Apr 7, 2026
Merged

Remove unused ddtrace appsec packages#761
avara1986 merged 3 commits intomainfrom
avara1986-patch-1

Conversation

@avara1986
Copy link
Copy Markdown
Member

Remove additional ddtrace appsec packages from site-packages.

What does this PR do?

Motivation

Testing Guidelines

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

Remove additional ddtrace appsec packages from site-packages.
@avara1986 avara1986 marked this pull request as ready for review April 6, 2026 12:31
@avara1986 avara1986 requested review from a team as code owners April 6, 2026 12:31
@avara1986 avara1986 requested a review from lym953 April 6, 2026 12:31
Copy link
Copy Markdown
Contributor

@rithikanarayan rithikanarayan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for doing this! Please wait until the e2e test status job has passed before merging. :)

Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
@avara1986 avara1986 merged commit affe9c7 into main Apr 7, 2026
105 checks passed
@avara1986 avara1986 deleted the avara1986-patch-1 branch April 7, 2026 07:36
gh-worker-dd-mergequeue-cf854d bot pushed a commit to DataDog/dd-trace-py that referenced this pull request Apr 7, 2026
…h_utils (#17334)

## Summary
- Extract `rel_path()` and `_compute_file_line()` from `VulnerabilityBase` in `_iast/taint_sinks/_base.py` into shared functions (`rel_path` and `get_caller_frame_info`) in `_patch_utils.py`.
- Migrate `insecure_cookie.py` to use the shared `get_caller_frame_info()` instead of `cls._compute_file_line()`.
- Update `test_weak_hash.py` mock target from `get_info_frame` to `get_caller_frame_info`.
- Both IAST and SCA can now reuse these functions without depending on IAST internals.

Split out from #17156 to keep PRs incremental and reviewable.

> **Important:** Before merging this PR, DataDog/datadog-lambda-python#761 must be merged first.

## Test plan
- [ ] Existing IAST vulnerability tests pass (they call `VulnerabilityBase.report()` which now delegates to `get_caller_frame_info()`)
- [ ] IAST cookie tests pass (`insecure_cookie.py` now uses shared function)
- [ ] `test_weak_hash.py` edge case test passes with updated mock target

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: alberto.vara <alberto.vara@datadoghq.com>
gh-worker-dd-mergequeue-cf854d bot pushed a commit to DataDog/dd-trace-py that referenced this pull request Apr 7, 2026
)

## Summary
- Move the native `_stacktrace` C extension from `ddtrace/appsec/_iast/` to `ddtrace/appsec/_shared/` so it can be reused by both IAST and SCA without creating a dependency from SCA into IAST internals.
- Update all imports, build configuration (`setup.py`), and test references to use the new `ddtrace.appsec._shared._stacktrace` path.

Split out from #17156 to keep PRs incremental and reviewable.

> **Important:** Before merging this PR, DataDog/datadog-lambda-python#761 must be merged first, since `datadog-lambda-python` imports `ddtrace.appsec._iast._stacktrace` and needs to be updated to the new path.

## Test plan
- [ ] Existing IAST stacktrace tests pass (`tests/appsec/iast/test_stacktrace.py`)
- [ ] IAST memcheck tests pass (`tests/appsec/iast_memcheck/test_iast_mem_check.py`)
- [ ] Architecture loading module test passes (`tests/appsec/architectures/test_appsec_loading_modules.py`)
- [ ] Serverless import test passes (`tests/internal/test_serverless.py`)
- [ ] Native C extension builds correctly from new path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: alberto.vara <alberto.vara@datadoghq.com>
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.

3 participants