Skip to content

Commit 96bc38c

Browse files
committed
security: harden CI Docker Compose credentials
1 parent 8389baf commit 96bc38c

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Cấu hình "Surgical Exclusion" - Chỉ quét đúng những gì mình thay đổi để tránh nhiễu từ repo gốc
2+
exclude: ^(?!bamboo/docker-compose\.yml|.pre-commit-config\.yaml)
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.6.0
7+
hooks:
8+
- id: trailing-whitespace
9+
- id: end-of-file-fixer
10+
- id: check-yaml
11+
- id: check-json
12+
- id: check-merge-conflict
13+
- id: mixed-line-ending
14+
args: ['--fix=lf']
15+
16+
- repo: https://github.com/astral-sh/ruff-pre-commit
17+
rev: v0.14.10
18+
hooks:
19+
- id: ruff
20+
- id: ruff-format
21+
22+
# Configuration pre-commit.ci
23+
ci:
24+
autofix_prs: false
25+
autoupdate_schedule: monthly

bamboo/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ services:
33
postgres:
44
image: postgres:13.9-alpine
55
environment:
6-
- POSTGRES_PASSWORD=password
6+
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
77
network_mode: "service:build_env"
88
ftp:
99
image: maven.earthdata.nasa.gov/cumuluss/vsftpd:3
1010
network_mode: "service:build_env"
1111
volumes:
1212
- ../packages/test-data:/srv:ro
1313
environment:
14-
- FTP_USER=testuser
15-
- FTP_PASSWORD=testpass
14+
- FTP_USER=${FTP_USER:-testuser}
15+
- FTP_PASSWORD=${FTP_PASSWORD:-testpass}
1616
- FTP_PASV_ADDRESS=127.0.0.1
1717
http:
1818
image: httpd:alpine

0 commit comments

Comments
 (0)