DS117838 and DS173237 report published sha256 digests as secrets
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 56/100
Research direction
Start by locating the definitions and tests for rules DS117838 and DS173237 in the DevSkim repository, then read how each rule identifies secrets and handles exclusions. Add coverage for the two examples in the issue and confirm both checks no longer report the published digests while still detecting secrets; the issue does not name specific files or test commands.
Written by the indexing model from the issue text.
Description
I run DevSkim 1.0.70 through MegaLinter 10.1.0. Two rules report published checksums as secrets.
DS117838 matches the "key" inside "keycloak" on this line, then the image digest after it:
image: registry.gitlab.com/example/keycloak@sha256:28ea761821b553939f940f81640b2c004b5a512c58d190b7b766382d6395e3dc
DS173237 reports every quoted checksum in a JSON list of files, like this one:
{ "path": "formats-reference.md", "sha256": "bf1dd3e3c71a72cc309db4fca5074abdc9618b8351ab2c72fc896f22f6457769" }
JSON has no comments, so I can't suppress these lines inline (#594). On my project that is 252 findings in two files.
A value right after @sha256:, or under a key named sha256, is a checksum, not a secret. Could both rules skip these two cases?
- Dominant language
- C#
- Stars
- 1k
- Forks
- 135
- Avg merge
- 15h 14m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DevSkim
-
false positive
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
exclude_file_regex and applies_to_file_regex only see the file name in devskim analyzePossibly taken @gfs claimed this 30 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
The DevSkim Repository Description still mentions IDE extensions but these are not longer includedOpenbug
Difficulty 1/5 Under an hour Newbie friendliness 55/100
-
How to match files without a file extension?Possibly taken @gfs claimed this 195 days ago. Openenhancement
microsoft/DevSkim#747 · 4 comments · 1 reaction · 2 assignees ·
-
Support for HTML (see attached example rule)May be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
All issues in microsoft/DevSkim
Similar issues
-
elsa 3
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
elsa-workflows/elsa-core#9349 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PereViader/ManualDi#200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Forrest-Technologies/drover#1040 ·
Maintainers usually reply within 1 day
-
todo
Difficulty 1/5 Under an hour Newbie friendliness 72/100
tonybaloney/CSnakes#864 ·