Skip to content

Commit ec10016

Browse files
authored
Merge pull request #74 from stacknil/stacknil/repo-sentinel-hygiene-gate
chore(security): add repo sentinel hygiene gate
2 parents 91f64ed + f690395 commit ec10016

3 files changed

Lines changed: 59 additions & 0 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.h text eol=lf
66
*.md text eol=lf
77
*.json text eol=lf
8+
*.toml text eol=lf
89
*.yml text eol=lf
910
*.yaml text eol=lf
1011
*.txt text eol=lf
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Repo Sentinel
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
repo-sentinel:
13+
name: Repo Sentinel
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
22+
with:
23+
python-version: "3.14"
24+
25+
- name: Install repo-sentinel-lite
26+
run: |
27+
python -m venv "$RUNNER_TEMP/repo-sentinel-venv"
28+
"$RUNNER_TEMP/repo-sentinel-venv/bin/python" -m pip install --upgrade pip
29+
"$RUNNER_TEMP/repo-sentinel-venv/bin/python" -m pip install repo-sentinel-lite
30+
31+
- name: Run repository hygiene gate
32+
run: |
33+
"$RUNNER_TEMP/repo-sentinel-venv/bin/repo-sentinel" scan \
34+
--fail-on-severity error \
35+
--format text \
36+
.

.reposentinel.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# LogLens uses repo-sentinel-lite as a narrow hygiene gate:
2+
# required repository files plus accidental sensitive filenames.
3+
#
4+
# High-entropy content scanning is intentionally disabled here so fixture logs
5+
# and C++ build outputs do not affect this gate.
6+
max_text_file_size = 0
7+
entropy_threshold = 999.0
8+
9+
ignore_globs = [
10+
"build/**",
11+
"build_manual*",
12+
"out/**",
13+
"report.md",
14+
"report.json",
15+
"*.exe",
16+
"CMakeFiles",
17+
"CMakeFiles/**",
18+
"CMakeCache.txt",
19+
"cmake_install.cmake",
20+
"compile_commands.json",
21+
"*.vcxproj.user",
22+
]

0 commit comments

Comments
 (0)