Scanning for Violations
UnifAI continuously scans, fixes, validates, and promotes AI-compliant code across developer, CI/CD, and production stages. They reduce manual engineering effort by enforcing security, compliance, and open-source governance policies automatically throughout the software lifecycle.
After completing the configuration of the Lineaje MCP server, open the source code repository that you want Lineaje to scan for policy violations.
Policies are disabled by default. You must enable policies in UnifAI to allow policies scanning.
On-demand scanning
Use this workflow when hook functionality is disabled in your environment or unavailable in your IDE.
You can request manuals scans for policy violations:
To check for violations, open, edit, and save the file you want to be scanned. You can do this in an IDE (for example, Cursor) or CLI (for example Claude Code).
Run the command
scan file_processor.py using Lineaje. Replacefile_processor.pywith your file name. Lineaje performs a policy‑violation scan on the specified file and generates a detailed report. The report includes the project evaluated, the policies applied, and the controls enforced during the scan.
If the Lineaje MCP server is not detected during scanning, disable the MCP server, then enable it. In addition, select the latest agent model instead of an auto Agent.
The following images display Lineaje suggestions for modifying code to prevent policy violations.
Cursor:

Claude Code:

Installing a hook for automatic scanning
Use this workflow when hook integration is available in your IDE.
Hooks automatically detect changes to a file and send the file to the MCP server for policy violation detection and remediation.
Cursor
To install a hook in Cursor:
Open a file in your repository.
Go to Settings > Hooks.
Click Open user config.
Copy and paste the following JSON configuration snippet:
{
"version": 1,
"hooks": {
"afterFileEdit": [
{
"command": "python3 /path/to/aiepo-hooks/hooks/after_file_edit_hook_handler.py"
}
],
"stop": [
{
"command": "python3 /path/to/aiepo-hooks/hooks/stop_hook_handler.py"
}
]
}
}
Open the file that you want Lineaje to scan.
As you write code, Lineaje evaluates the selected file for policy violations and produces a detailed report. The report lists the project reviewed, the applied policies, and the controls enforced.
Last updated