Skip to content

[sudo-rs] disable some shellcheck checks#1658

Merged
Stromweld merged 3 commits intochef:mainfrom
konstruktoid:shellcheck
Dec 15, 2025
Merged

[sudo-rs] disable some shellcheck checks#1658
Stromweld merged 3 commits intochef:mainfrom
konstruktoid:shellcheck

Conversation

@konstruktoid
Copy link
Copy Markdown
Contributor

Description

I forgot to include the shellcheck rule from the initial update (https://github.com/konstruktoid/hardening/blob/master/scripts/sudo#L8C3-L13) in order to pass all tests (https://github.com/chef/bento/actions/runs/20174920499/job/57920339001?pr=1657#step:6:1)

Related Issue

https://github.com/chef/bento/actions/runs/20174920499/job/57920339001?pr=1657#step:6:1

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
@konstruktoid konstruktoid requested review from a team and Stromweld as code owners December 12, 2025 21:37
@Stromweld
Copy link
Copy Markdown
Collaborator

For maximum compatability we don't use bash scripts. The templates default to sh shell. Instead of disabling the check can you update the if statement to be shell compatible check.

@konstruktoid
Copy link
Copy Markdown
Contributor Author

Will do, but is there still a case where the default shell isn't bash?

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
@konstruktoid
Copy link
Copy Markdown
Contributor Author

updated

@sonarqubecloud
Copy link
Copy Markdown

@Stromweld
Copy link
Copy Markdown
Collaborator

yeah freebsd doesn't include bash. Not sure which others may not either. MacOS has an old version of bash before the licensing change.

@Stromweld Stromweld merged commit a888f6d into chef:main Dec 15, 2025
80 of 249 checks passed
@konstruktoid
Copy link
Copy Markdown
Contributor Author

yeah freebsd doesn't include bash. Not sure which others may not either. MacOS has an old version of bash before the licensing change.

yeah, but this was an Ubuntu change.
Nevertheless, script is compliant.

@konstruktoid konstruktoid deleted the shellcheck branch December 15, 2025 23:03
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.

2 participants