openenv-secaudit / server /gitleaks_eval.py
dexter-2k's picture
Upload folder using huggingface_hub
acd8d0e verified
Raw
History Blame Contribute Delete
673 Bytes
from __future__ import annotations
"""Spec-aligned wrapper for the security grader.
This module preserves the benchmark's history-aware git recovery behavior via
`SecurityGrader._ensure_git_source`, which prevents agents from bypassing scans
by deleting `.git`.
"""
from graders.security import SecurityFinding, SecurityGrader as BaseSecurityGrader, SecurityReport
class SecurityGrader(BaseSecurityGrader):
"""Spec-facing security grader with git integrity reporting."""
def git_integrity_message(report: SecurityReport) -> str | None:
return report.integrity_error
__all__ = ["SecurityFinding", "SecurityGrader", "SecurityReport", "git_integrity_message"]