-
Notifications
You must be signed in to change notification settings - Fork 458
38 lines (31 loc) · 1.2 KB
/
scan_iis_server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Scan IIS Web Server
on:
push:
branches: [release]
pull_request:
branches: [release]
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install IIS
run: |
Install-WindowsFeature -name Web-Server -IncludeManagementTools -IncludeAllSubFeature
Import-Module IISAdministration
# Generate a self-signed cert
$Cert = New-SelfSignedCertificate -DnsName "TestSite" -KeyAlgorithm RSA -KeyLength 2048 -CertStoreLocation "Cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(10)
$ThumbPrint = $Cert.Thumbprint
# Create an HTTPS binding with the self-signed cert
New-IISSiteBinding -Name "Default Web Site" -BindingInformation "*:443:" -CertificateThumbPrint $ThumbPrint -CertStoreLocation "Cert:\LocalMachine\My" -Protocol https
- name: Install pip
run: |
python -m pip install --upgrade pip setuptools
- name: Install SSLyze
run: python setup.py install
- name: Scan web server
run: python tests/web_servers/scan_localhost.py iis