Files
kubescape/cmd
majiayu000 46eb266064 feat: add labels-to-copy flag to copy workload labels to reports
Add a new --labels-to-copy CLI flag that allows users to specify which
labels from Kubernetes workloads should be extracted and included in
scan reports. This makes it easier to tie scan results back to app
teams or repositories by including relevant labels like 'app', 'team',
or 'environment' in the report output.

Changes:
- Add LabelsToCopy field to ScanInfo and OPASessionObj structs
- Add --labels-to-copy flag to scan command
- Add ResourceLabels field to PostureReportWithSeverity for JSON output
- Implement extractResourceLabels function to extract specified labels
- Add unit tests for label extraction functionality

Fixes #1660

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-31 06:20:29 +08:00
..
2023-11-26 16:26:21 +05:00
2025-06-10 14:32:26 +03:00
2025-01-09 12:14:56 +01:00
2025-12-30 21:03:50 +01:00
2025-09-17 10:11:19 +02:00
2025-04-01 12:26:15 +03:00
2025-09-13 18:06:37 +05:30
2025-07-26 11:08:43 +02:00
2025-04-01 12:26:15 +03:00
2025-07-24 12:11:31 +03:00