AbsaOSS / AbsaOSS/organizational-workflows

AquaSec issue bodies are regenerated on every commit to the scanned branch

Đang mở
#99 0 bình luận 0 reaction 1 người được giao Được @tmikula-dev nhận Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
0
Fork
0
Merge trung bình
5 ngày 3 giờ
Pull request đã merge (30 ngày)
3

Mô tả

### Describe the bug

The AquaSec security automation rewrites the body of existing security issues on every nightly run, even when the underlying finding has not changed at all.

The cause is the `scm_file` field returned by the AquaSec API. It is a **commit-pinned** blob URL:

```
https://github.com///blob/<40-char-commit-sha>/#L
```

That SHA reflects the tip of the scanned branch at scan time, so **any** commit to the branch changes it — including commits that touch completely unrelated files.

The rendered issue body embeds that URL under **Location → File**. When the sync compares the freshly built body against the stored one, the differing SHA makes every issue look changed, so it issues an update. On a large repository this means tens (or hundreds) of issues are edited every night, producing notification spam for subscribers, pointless GitHub API traffic, and a misleading "updated N minutes ago" signal that hides genuine changes.

### Expected state

An issue body is only updated when the finding itself changes (severity, line, description, resolution state). A commit to an unrelated file must not cause any issue body to be rewritten, so "updated" reliably signals a real change to the finding.

### Impact / Severity

Medium

### Attachments / Evidence

Body fragment from an affected issue (`absa/project`, rule `AVD-22`):

```markdown
## Location
- **Repository:** absa/project
- **File:** playwright-run.yaml <-- link target differs only by commit SHA
- **Start Line:** 54
- **End Line:** 54
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.