mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
fix: restore missing hooks and correct config from main branch
- Add back fips-compliance hook - Add back mypy-full hook (using wrapper script for UV index support) - Keep mypy version at v1.18.2 to match main
This commit is contained in:
parent
a9e46a0e62
commit
23aff83aa9
1 changed files with 23 additions and 0 deletions
|
|
@ -83,6 +83,12 @@ repos:
|
|||
pass_filenames: false
|
||||
require_serial: true
|
||||
files: ^(pyproject\.toml|uv\.lock)$
|
||||
- id: mypy-full
|
||||
name: mypy (full type_checking)
|
||||
entry: ./scripts/uv-run-with-index.sh run --group dev --group type_checking mypy
|
||||
language: system
|
||||
pass_filenames: false
|
||||
stages: [manual]
|
||||
- id: distro-codegen
|
||||
name: Distribution Template Codegen
|
||||
additional_dependencies:
|
||||
|
|
@ -177,6 +183,23 @@ repos:
|
|||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
- id: fips-compliance
|
||||
name: Ensure llama-stack remains FIPS compliant
|
||||
entry: bash
|
||||
language: system
|
||||
types: [python]
|
||||
pass_filenames: true
|
||||
exclude: '^tests/.*$' # Exclude test dir as some safety tests used MD5
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
grep -EnH '^[^#]*\b(md5|sha1|uuid3|uuid5)\b' "$@" && {
|
||||
echo;
|
||||
echo "❌ Do not use any of the following functions: hashlib.md5, hashlib.sha1, uuid.uuid3, uuid.uuid5"
|
||||
echo " These functions are not FIPS-compliant"
|
||||
echo;
|
||||
exit 1;
|
||||
} || true
|
||||
|
||||
ci:
|
||||
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue