Installation
Getting Started
Configure the Hook
Create.pre-commit-config.yaml at the root of your repository:
Verify Configuration
Install the Hook
Test the Hook
Configuration
Environment Variables
The hook automatically loads variables from a.env file in your project root:
How It Works
Example Workflow
Given this project structure:- Scans staged files for open-source components
- Compares detected components against your
scanoss.jsondeclarations - Blocks the commit if undeclared components are found
Example Output
- Declare the components in
scanoss.json - Run
scanoss-ccin the terminal to review and declare the components - Remove the problematic code