Skip to content

Commit 549c6eb

Browse files
committed
build: keep dist-info/METADATA files for SCA to work correctly
1 parent 646fe14 commit 549c6eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_taint_tracki
2525
RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_stacktrace*.so
2626
# _stack_v2 may not exist for some versions of ddtrace (e.g. under python 3.13)
2727
RUN rm -f ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/stack_v2/_stack_v2.*.so
28-
# remove *.dist-info directories except any entry_points.txt files
29-
RUN find ./python/lib/$runtime/site-packages/*.dist-info -not -name "entry_points.txt" -type f -delete
28+
# remove *.dist-info directories except any entry_points.txt files and METADATA files required for Appsec Software Composition Analysis
29+
RUN find ./python/lib/$runtime/site-packages/*.dist-info \
30+
-type f \
31+
! \( -name 'entry_points.txt' -o -name 'METADATA' \) \
32+
-delete
3033
RUN find ./python/lib/$runtime/site-packages -type d -empty -delete
3134

3235
# Remove requests and dependencies

0 commit comments

Comments
 (0)