chainguard-dev / chainguard-dev/tw

shell-deps-check should have a way to ignore specific deps

Open
#336 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2
Forks
36
Avg merge
4h 36m
Merged PRs (30d)
6

Description

For example, if a script has optional capabilities that require a desktop environment or an optional dependency, something like:

    # display, feh, gm, qdbus, qrencode are only necessary when displaying QR
    # codes or copying to a desktop environment's clipboard.
    - uses: test/tw/shell-deps-check
      with:
        files: /usr/bin/pass
        strict: false

could instead be:

    # display, feh, gm, qdbus, qrencode are only necessary when displaying QR
    # codes or copying to a desktop environment's clipboard.
    - uses: test/tw/shell-deps-check
      with:
        files: /usr/bin/pass
        ignore: display feh gm qdbus qrencode

and the output could be:

Dependency Check Results
========================
Analyzed: 1 shell script(s)
Checked against PATH: /usr/bin
Mode: report-only
/usr/bin/pass:
shell: /usr/bin/env bash
dependencies found: 27
 ✓ available (22): cat cp diff dirname find git grep head mkdir mktemp mv pkill rm rmdir sed sleep sort tail tr tree tty which
 - ignored (5): display feh gm qdbus qrencode
 ✗ missing (0):
---
Summary:
Total scripts analyzed: 1
Total dependencies found: 27
Total ignored commands: 5
Total missing commands: 0
Total GNU compatibility issues: 0
✗ Issues found in 0 of 1 file(s)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the shell-deps-check action entry point and trace how its files and strict inputs are parsed and how dependency results are rendered. Add the ignore input and verify that ignored commands are separated from available and missing dependencies, with counts matching the example output. Validate the behavior using the sample /usr/bin/pass invocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go, shell
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.