Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,30 @@ repos:
hooks:
- id: black
language_version: python3
files: ^scripts/python/.*\.py$
files: ^(ai_command_auditor/.*\.py|scripts/python/.*\.py)$

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
files: ^scripts/python/.*\.py$
files: ^(ai_command_auditor/.*\.py|scripts/python/.*\.py)$

- repo: https://github.com/pycqa/pylint
rev: v3.3.7
hooks:
- id: pylint
files: ^scripts/python/.*\.py$
additional_dependencies: [pyyaml, openai, requests]
files: ^(ai_command_auditor/.*\.py|scripts/python/.*\.py)$
additional_dependencies: [pyyaml, openai, requests, click, colorama, jsonschema]
args: ["--exit-zero", "--reports=no"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.16.0
rev: v1.8.0
hooks:
- id: mypy
files: ^scripts/python/.*\.py$
additional_dependencies: [types-PyYAML, types-requests]
args: ["--ignore-missing-imports", "--no-strict-optional"]
files: ^(ai_command_auditor/.*\.py|scripts/python/.*\.py)$
additional_dependencies: [types-PyYAML, types-requests, click, colorama, jsonschema]
args: ["--ignore-missing-imports", "--no-strict-optional", "--explicit-package-bases"]

# Local hooks
- repo: local
Expand All @@ -59,7 +59,7 @@ repos:
name: Comprehensive Linting Check
entry: ./scripts/hooks/pre-commit.sh
language: system
files: ^(scripts/|\.github/workflows/|.*\.md|.*\.yml|.*\.yaml).*$
files: ^(scripts/|ai_command_auditor/|\.github/workflows/|.*\.md|.*\.yml|.*\.yaml).*$
pass_filenames: false

# Bash/Shell linting
Expand Down
26 changes: 26 additions & 0 deletions ai_command_auditor/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""
AI Command Auditor - A security tool for intercepting and validating shell commands.

This package provides command validation through rule-based and AI-based checks,
with the ability to block or modify dangerous commands.

Author: Etherisc
Version: 1.0.0
"""

__version__ = "1.0.0"
__author__ = "Etherisc"
__email__ = "dev@etherisc.com"
__description__ = "AI-powered command auditing and security validation tool"

# Package-level imports
from .core.config import AuditorConfig
from .core.rules import RuleEngine
from .core.validator import CommandValidator

__all__ = [
"AuditorConfig",
"CommandValidator",
"RuleEngine",
"__version__",
]
11 changes: 11 additions & 0 deletions ai_command_auditor/analysis/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
Analysis modules for AI Command Auditor.

This module provides AI-powered analysis capabilities for command validation
and security checking.
"""

from typing import List

# Placeholder exports for future implementation
__all__: List[str] = []
12 changes: 12 additions & 0 deletions ai_command_auditor/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
Command Line Interface for AI Command Auditor.

This module provides the CLI commands for initializing, configuring, and managing
the AI Command Auditor in projects.
"""

from .main import main

__all__ = [
"main",
]
Loading
Loading