π fix(scripts): third audit pass β string interpolation, obsolete APIβ¦ #165
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # PSScriptAnalyzer | |
| # https://github.com/microsoft/psscriptanalyzer-action | |
| # https://github.com/PowerShell/PSScriptAnalyzer | |
| --- | |
| name: PSScriptAnalyzer | |
| on: | |
| push: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| permissions: | |
| contents: read # for actions/checkout to fetch code | |
| security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
| actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | |
| name: π΅οΈββοΈ PSScriptAnalyzer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | |
| - name: π΅οΈββοΈ Run PSScriptAnalyzer | |
| uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f | |
| with: | |
| # The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules. | |
| path: .\ | |
| recurse: true | |
| # Include your own basic security rules. Removing this option will run all the rules | |
| includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"' | |
| excludeRule: '"PSAvoidLongLines"' | |
| output: results.sarif | |
| # Upload the SARIF file generated in the previous step | |
| - name: β¬οΈ Upload SARIF results file | |
| uses: github/codeql-action/upload-sarif@5d5cd550d3e189c569da8f16ea8de2d821c9bf7a # v3.31.2 | |
| with: | |
| sarif_file: results.sarif |