Skip to content

Commit 9cb7a65

Browse files
fix(ci): restore megalinter gate on main (hadolint, editorconfig, trufflehog) (#286)
* fix(ci): restore megalinter gate on main (hadolint, editorconfig, trufflehog) Megalinter has been red on main since the v10 image / trufflehog 3.96 toolchain drift. Three independent findings, fixed at the source: 1. hadolint DL3066 (Dockerfile:32): use numeric UID (USER 1000) — the user is created with --uid 1000 a few lines above. 2. editorconfig-checker: docs/TROUBLESHOOTING.md contained mixed CRLF/LF line endings (introduced via PR #285); normalized to LF per .editorconfig (end_of_line = lf). 3. trufflehog >=3.96 Lob detector flags every `test_*` function name as a verified Lob key (Lob test keys share the `test_` prefix). Excluded only the Lob detector via REPOSITORY_TRUFFLEHOG_ARGS so all other secret detectors stay active. Verified locally: 0 findings with trufflehog 3.96.0 after exclusion. Validation: - trufflehog 3.96.0 --only-verified --exclude-detectors=Lob: clean - pytest tests/test_catalog_resolve.py tests/test_cli.py: 35 passed * fix(ci): exclude test fixtures from trufflehog via .trufflehogignore REPOSITORY_TRUFFLEHOG_ARGS is not honored by the MegaLinter trufflehog descriptor; the supported mechanism is a workspace .trufflehogignore file, which MegaLinter merges into the generated --exclude-paths file. Excludes packages/create-awesome-python-app/tests/ only — production code remains fully scanned. --------- Co-authored-by: ulises-jeremias <ulises-jeremias@users.noreply.github.com>
1 parent 762a0c4 commit 9cb7a65

4 files changed

Lines changed: 384 additions & 380 deletions

File tree

.trufflehogignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Lob detector false-positives: any `test_*` function name looks like a Lob
2+
# test key (shared `test_` prefix). Exclude test fixtures from the scan;
3+
# production code stays fully covered.
4+
packages/create-awesome-python-app/tests/.*

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN useradd --create-home --uid 1000 --shell /bin/bash app \
2929
sleep 15; \
3030
done
3131

32-
USER app
32+
USER 1000
3333
WORKDIR /home/app
3434

3535
ENTRYPOINT ["create-awesome-python-app"]

0 commit comments

Comments
 (0)