Skip to content

Enhance error handling for invalid domains in UserPrincipalName durin… #144

Enhance error handling for invalid domains in UserPrincipalName durin…

Enhance error handling for invalid domains in UserPrincipalName durin… #144

# 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