Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions opa/rego/rules/untrusted_checkout_exec.rego
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ build_commands[cmd] = {

results contains poutine.finding(rule, pkg_purl, {
"path": workflow_path,
"line": step.line,
"line": step.lines.run,
"details": sprintf("Detected usage of `%s`", [cmd]),
}) if {
[pkg_purl, workflow_path, step] := _steps_after_untrusted_checkout[_]
Expand All @@ -49,7 +49,7 @@ results contains poutine.finding(rule, pkg_purl, {

results contains poutine.finding(rule, pkg_purl, {
"path": workflow_path,
"line": step.line,
"line": step.lines.uses,
"details": sprintf("Detected usage the GitHub Action `%s`", [step.action]),
}) if {
[pkg_purl, workflow_path, step] := _steps_after_untrusted_checkout[_]
Expand Down
6 changes: 3 additions & 3 deletions scanner/inventory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestFindings(t *testing.T) {
Purl: purl,
Meta: opa.FindingMeta{
Path: ".github/workflows/valid.yml",
Line: 29,
Line: 30,
Details: "Detected usage of `npm`",
},
},
Expand All @@ -154,7 +154,7 @@ func TestFindings(t *testing.T) {
Purl: purl,
Meta: opa.FindingMeta{
Path: ".github/workflows/valid.yml",
Line: 55,
Line: 56,
Details: "Detected usage the GitHub Action `bridgecrewio/checkov-action`",
},
},
Expand All @@ -163,7 +163,7 @@ func TestFindings(t *testing.T) {
Purl: purl,
Meta: opa.FindingMeta{
Path: ".github/workflows/valid.yml",
Line: 59,
Line: 60,
Details: "Detected usage of `pre-commit`",
},
},
Expand Down