Audit repo trước khi gửi cho model AI free: cổng pre-flight
Description and use
Pre‑flight audit of a repository before sending it to a free AI model to prevent leakage of sensitive data
Problem
Đảm bảo không rò rỉ dữ liệu nhạy cảm khi gửi mã nguồn tới mô hình AI miễn phí
Outcome
Gate pre‑flight giúp ngăn chặn rò rỉ dữ liệu nhạy cảm, giảm rủi ro bảo mật khi sử dụng mô hình AI miễn phí
Workflow
- 1. Định nghĩa các rò rỉ cần kiểm tra (file secret, key material, hostname nội bộ, git history)
- 2. Viết script pre‑flight dùng rg để tìm các mẫu rò rỉ
- 3. Thêm kiểm tra sâu hơn bằng gitleaks hoặc trufflehog
- 4. Thêm hai test CI (positive và negative) và kiểm tra logs platform
- 5. Triển khai gate trong CI và thực hiện kiểm tra trước khi gửi
- 6. Theo dõi logs, egress traffic và thực hiện rotate secret khi cần
Evidence
Bài viết đưa ba test cụ thể: Positive fixture, Negative fixture, Log test
Script pre‑flight dùng rg với 4 bước kiểm tra
- Record date: 2026-09-06T02:36:24.973Z