Skip to content

✨ Analyze Makefile recipes for unpinned downloads - #5179

Open
basriakkaya wants to merge 1 commit into
ossf:mainfrom
basriakkaya:agent/makefile-dependency-pinning
Open

✨ Analyze Makefile recipes for unpinned downloads#5179
basriakkaya wants to merge 1 commit into
ossf:mainfrom
basriakkaya:agent/makefile-dependency-pinning

Conversation

@basriakkaya

Copy link
Copy Markdown

What kind of change does this PR introduce?

Feature: extend the Dependency-Pinning check to analyze Makefile recipe commands.

What is the current behavior?

The check analyzes shell scripts, workflow run blocks, and Dockerfile RUN commands, but it does not detect unpinned download-and-execute patterns in Makefile recipes.

What is the new behavior (if this is a feature change)?

Makefile recipe commands are passed through the existing shell download validator. The implementation:

  • recognizes conventional Makefile names case-insensitively

  • ignores non-recipe syntax and recipe comments

  • handles Make command prefixes (@, -, and +)

  • joins backslash-continued recipe commands

  • preserves source line locations

  • tracks downloaded files across recipes in the same Makefile

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Fixes #884

Special notes for your reviewer

Validation completed:

  • go test ./checks/... -count=1
  • tools/bin/golangci-lint run -c .golangci.yml --new-from-rev=HEAD (0 issues)
  • git diff --check

The repository-wide make check-linter currently also reports two pre-existing findings outside this change in policy/policy.go:144 (cognitive complexity) and policy/policy_test.go:311 (field alignment).

Does this PR introduce a user-facing change?

Dependency-Pinning now detects unpinned download-and-execute commands in Makefile recipes.

Signed-off-by: Basri Akkaya <48864655+basriakkaya@users.noreply.github.com>
@basriakkaya
basriakkaya marked this pull request as ready for review August 14, 2026 01:37
@basriakkaya
basriakkaya requested a review from a team as a code owner August 14, 2026 01:37
@basriakkaya
basriakkaya requested review from jeffmendoza and spencerschrock and removed request for a team August 14, 2026 01:37
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Support Makefiles in dependency-pinning check

1 participant