-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.06 KB
/
Copy pathwellknown-enforcement.yml
File metadata and controls
42 lines (34 loc) · 1.06 KB
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
39
40
41
42
# SPDX-License-Identifier: PMPL-1.0-or-later
name: .well-known Enforcement
on:
pull_request:
paths:
- '.well-known/**'
push:
branches: [main]
permissions: read-all
jobs:
validate-wellknown:
name: Validate .well-known Directory
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Check .well-known structure
run: |
if [ ! -d ".well-known" ]; then
echo "INFO: .well-known directory not present (optional)"
exit 0
fi
echo "Validating .well-known structure..."
# Check for security.txt if present
if [ -f ".well-known/security.txt" ]; then
# Validate basic security.txt format
if ! grep -qi "Contact:" .well-known/security.txt; then
echo "ERROR: security.txt must contain Contact: field"
exit 1
fi
fi
echo ".well-known validation passed"