Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude the action name only not the full uses in actions_check_pinned_tags #95

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions rule-types/github/actions_check_pinned_tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ def:
# Check if the step has a uses directive
not is_null(s.uses)

# Skip if the full name of the action is part of excludes
not is_excluded(s.uses, input.profile.exclude)

# Split the uses directive at '@'
parts := split(s.uses, "@")

# Skip if the action name is part of excludes
not is_excluded(parts[0], input.profile.exclude)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add an or statement checking the case where the tag is used in the excludes


# Check if the string after '@' is 40 characters long (SHA-1 hash length)
count(parts[1]) != 40

Expand Down
Loading