Skip to content

Clean up CI: remove Bandit, expand PSScriptAnalyzer, delete junk file#2

Merged
cgfixit merged 1 commit into
mainfrom
optimize/ci-workflow-cleanup
Jun 30, 2026
Merged

Clean up CI: remove Bandit, expand PSScriptAnalyzer, delete junk file#2
cgfixit merged 1 commit into
mainfrom
optimize/ci-workflow-cleanup

Conversation

@cgfixit

@cgfixit cgfixit commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove bandit.yml: Bandit is a Python security linter. This repo has no Python code, so the workflow was pure CI noise. It also ran with exit_zero: true, meaning it could never block a PR even if it did find something.
  • Expand PSScriptAnalyzer rules from 2 to 8, adding checks for: hardcoded computer names, unused declared variables, cmdlet aliases, state-changing functions without ShouldProcess, positional parameters, and output type correctness.
  • Fix path for Ubuntu runner: changed .\ (Windows path separator) to . so the action works correctly on ubuntu-latest.
  • Delete .github/-.txt: orphaned empty file (likely artifact from workflow setup).

Motivation

The CI pipeline was spending runner minutes on a Python linter for a PowerShell repo, while the actual PowerShell linter only checked 2 of ~100+ available rules. This rebalances CI toward checks that actually match the codebase.

Test plan

  • Verify PSScriptAnalyzer workflow runs and completes on this PR
  • Confirm no false-positive SARIF findings from the new rules
  • Confirm Bandit workflow no longer triggers on new PRs

Generated by Claude Code

…k file

- Remove bandit.yml: Bandit is a Python security linter but this repo
  contains no Python code. The workflow ran with exit_zero: true anyway,
  so it never blocked anything — just CI noise.

- Expand PSScriptAnalyzer rule set from 2 rules to 8, adding:
  PSAvoidUsingComputerNameHardcoded, PSUseDeclaredVarsMoreThanAssignments,
  PSAvoidUsingCmdletAliases, PSUseShouldProcessForStateChangingFunctions,
  PSAvoidUsingPositionalParameters, PSUseOutputTypeCorrectly.

- Fix PSScriptAnalyzer path from '.\\' (Windows) to '.' for the
  ubuntu-latest runner.

- Remove orphaned .github/-.txt (empty artifact from workflow setup).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDj3zuCAvrsZcQKsPpPHvA
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

  • .github/workflows/bandit.yml

@cgfixit cgfixit marked this pull request as ready for review June 30, 2026 03:52
@cgfixit cgfixit merged commit a07ac7a into main Jun 30, 2026
5 checks passed
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