Skip to content

Conversation

@Piskoo
Copy link
Collaborator

@Piskoo Piskoo commented Jan 29, 2026

Summary

This PR adds a new GITLEAKS_JSON material type. JSON report returned by gitleaks is an array of objects, for validation we unmarshal each finding and then check for fingerprint field

Closes #2694

Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
@Piskoo Piskoo changed the title feat(attestation-material): add gitleaks material type feat(attestation-material): add gitleaks report material type Jan 30, 2026
}

var findings []GitleaksFinding
if err = json.Unmarshal(data, &findings); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

what kind of validation are we making here to make sure it's a gitleaks report?

Do we check the tool? Does the json output have any openAPI spec published? I believe we make spec validations in some of those materials.

Copy link
Collaborator Author

@Piskoo Piskoo Jan 30, 2026

Choose a reason for hiding this comment

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

We can't check the tool, the report is returned as an json array [{},{}] there's no tool information attached. There's no offical schema published. I decided to do validation similar to GHAS_SECRET_SCAN where we unmarshal and then check for a required field

Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
@Piskoo Piskoo changed the title feat(attestation-material): add gitleaks report material type feat(materials): add gitleaks json material type support Jan 30, 2026
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
@Piskoo Piskoo marked this pull request as ready for review January 30, 2026 09:59
javirln
javirln previously approved these changes Jan 30, 2026
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
@Piskoo Piskoo merged commit 79aed1e into chainloop-dev:main Jan 30, 2026
13 checks passed
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.

Add support for gitleaks secrets scanning reports

3 participants