Skip to content

Commit 8ce34cd

Browse files
committed
Initial commit
0 parents  commit 8ce34cd

15 files changed

Lines changed: 4190 additions & 0 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/** linguist-documentation=true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@{
2+
ExcludeRules = @(
3+
# Interactive CLI scripts — Write-Host with -ForegroundColor is intentional
4+
'PSAvoidUsingWriteHost',
5+
6+
# UTF-8 without BOM is intentional for cross-platform compatibility
7+
'PSUseBOMForUnicodeEncodedFile',
8+
9+
# Network scanning code — empty catch blocks intentionally swallow connection failures
10+
'PSAvoidUsingEmptyCatchBlock',
11+
12+
# Dead variables in original code left for forward-compatibility
13+
'PSUseDeclaredVarsMoreThanAssignments'
14+
)
15+
}

.github/workflows/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [stable, dev]
6+
pull_request:
7+
branches: [stable]
8+
9+
jobs:
10+
lint-powershell:
11+
name: PSScriptAnalyzer
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install PSScriptAnalyzer
17+
shell: pwsh
18+
run: Install-Module PSScriptAnalyzer -Force -Scope CurrentUser
19+
20+
- name: Analyze scripts
21+
shell: pwsh
22+
run: |
23+
$settings = './.github/PSScriptAnalyzerSettings.psd1'
24+
$results = Invoke-ScriptAnalyzer -Path ./scripts -Recurse -Severity Warning,Error -Settings $settings
25+
if ($results) {
26+
$results | Format-Table -AutoSize
27+
exit 1
28+
}
29+
Write-Host "[+] PSScriptAnalyzer: scripts/ clean."
30+
31+
- name: Analyze module
32+
shell: pwsh
33+
run: |
34+
$settings = './.github/PSScriptAnalyzerSettings.psd1'
35+
$results = Invoke-ScriptAnalyzer -Path ./ADMappingToolkit.psm1 -Severity Warning,Error -Settings $settings
36+
if ($results) {
37+
$results | Format-Table -AutoSize
38+
exit 1
39+
}
40+
Write-Host "[+] PSScriptAnalyzer: ADMappingToolkit.psm1 clean."
41+
42+
lint-python:
43+
name: Python syntax
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Syntax check
49+
run: |
50+
python3 -m py_compile tools/Invoke-PSEncoder.py
51+
echo "[+] Python syntax OK."
52+
53+
verify-structure:
54+
name: Verify structure
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Check required files
60+
run: |
61+
required=(
62+
"ADMappingToolkit.psm1"
63+
"scripts/Check-All.ps1"
64+
"scripts/Check-Servers.ps1"
65+
"scripts/Check-Clients.ps1"
66+
"tools/Invoke-PSEncoder.py"
67+
"tools/Sign-Scripts.ps1"
68+
"docs/index.html"
69+
"docs/doc.html"
70+
)
71+
fail=0
72+
for f in "${required[@]}"; do
73+
if [ ! -f "$f" ]; then
74+
echo "[!] Missing: $f"
75+
fail=1
76+
else
77+
echo "[+] $f"
78+
fi
79+
done
80+
exit $fail

.github/workflows/static.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy static content to Pages
2+
3+
on:
4+
push:
5+
branches: ["stable"]
6+
paths:
7+
- "docs/**"
8+
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
deploy:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v5
32+
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: './docs'
37+
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Windows
2+
Thumbs.db
3+
desktop.ini
4+
$RECYCLE.BIN/
5+
6+
# Editors
7+
.vscode/
8+
.idea/
9+
*.swp
10+
*~
11+
12+
# PowerShell signing artifacts
13+
*.pfx
14+
*.cer
15+
*.p12
16+
17+
# OS
18+
.DS_Store

0 commit comments

Comments
 (0)