-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (38 loc) · 1.2 KB
/
docker-compose-lint.yml
File metadata and controls
44 lines (38 loc) · 1.2 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
43
44
name: Docker Compose Lint
permissions:
contents: read
on:
pull_request:
paths:
- "docker-compose*.yml"
- ".github/workflows/docker-compose-lint.yml"
push:
branches:
- main
- master
paths:
- "docker-compose*.yml"
- ".github/workflows/docker-compose-lint.yml"
jobs:
validate:
name: Validate Docker Compose files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate docker-compose.yml
run: docker compose -f docker-compose.yml config --quiet
- name: Validate docker-compose.proxy-test.yml
run: docker compose -f docker-compose.proxy-test.yml config --quiet
if: hashFiles('docker-compose.proxy-test.yml') != ''
- name: Check for secrets in compose files
run: |
# Check for potential secrets or sensitive data
for file in docker-compose*.yml; do
if [ -f "$file" ]; then
echo "Checking $file for potential secrets..."
if grep -iE "(password|secret|token|key|api).*[:=].*['\"]" "$file"; then
echo "Warning: Potential secrets found in $file"
fi
fi
done