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.

circle-info

Policies are disabled by default. You must enable policies in UnifAI to allow policies scanning.

chevron-rightOn-demand scanninghashtag

Use this workflow when hook functionality is disabled in your environment or unavailable in your IDE.

You can request manuals scans for policy violations:

  1. 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).

  2. Run the command scan file_processor.py using Lineaje. Replace file_processor.py with 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.

circle-info

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:

chevron-rightInstalling a hook for automatic scanninghashtag

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:

  1. Open a file in your repository.

  2. Go to Settings > Hooks.

  3. Click Open user config.

  4. 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"
      }
    ]
  }
}
  1. Open the file that you want Lineaje to scan.

  2. 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