Understand the GGShield architecture and dependency layers
mainGGShield is structured into distinct layers to maintain separation of concerns. The architecture follows a strict hierarchy enforced by import-linter. When extending or modifying the codebase, you must adhere to these import rules:
cmd(Top Layer): Implements CLI commands (e.g.,ggshield secret scan pathis located incmd.secret.scan.path). These modules can import fromverticals,core,utils, andpy-gitguardian.verticals: Contains code specific to a single vertical. These modules can only import fromcore,utils, andpy-gitguardian.core: Contains basic modules used by bothverticalsandcmd. These can only import fromutilsandpy-gitguardian.utils: Contains generic, reusable code. These modules cannot import from any otherggshieldmodules or frompy-gitguardianto ensure they remain generic.
Note: All API interactions with the GitGuardian REST API should be implemented via the py-gitguardian package.