Skip to content
Back to skills

Audit Config Validator

ASecurity

Validates custom Alfresco audit application XML for well-formedness, correct audit model namespace, application key matching the enable property, and every RecordValue dataExtractor/dataGenerator referencing a declared and registered bean. Trigger automatically after generating or editing a *-audit.xml or an audit *DataExtractor.java / *DataGenerator.java file.

  • 13 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 6, 2026
toolsjavaspring

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add aborroy/aiup-alfresco --skill audit-config-validator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit Config Validator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Audit Config Validator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aborroy-audit-config-validator-aiup-alfresco/badge)](https://www.skillsdirectory.com/skills/aborroy-audit-config-validator-aiup-alfresco)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: "Validates custom Alfresco audit application XML for well-formedness, correct audit model namespace, application key matching the enable property, and every RecordValue dataExtractor/dataGenerator referencing a declared and registered bean. Trigger automatically after generating or editing a *-audit.xml or an audit *DataExtractor.java / *DataGenerator.java file."
user-invocable: false
allowed-tools: "Read, Grep, Glob"
---

# Audit Config Validator

Validate the given custom Alfresco audit application against these rules.

## XML Structure Validation
- The audit XML must be well-formed and its root `<Audit>` element must declare the audit model
  namespace `http://www.alfresco.org/repo/audit/model/3.2`.
- There must be exactly one `<Application>` with both `name` and `key` attributes.

## Application Key / Enable Consistency
- The `<Application key="{app-key}">` value must be lowercase and prefix-scoped.
- **FLAG as ERROR** if no `audit.{app-key}.enabled` property is present in a companion
  `.properties` file matching the `key` exactly.
  - **Why it breaks**: the application is defined but never enabled, so nothing is recorded.
- **WARN** if `audit.enabled=true` (the master switch) is not present anywhere in the project.

## Extractor / Generator Wiring
- Every `<RecordValue dataExtractor="X">` must reference a `<DataExtractor name="X" ...>`
  declared in `<DataExtractors>`.
- Every `<RecordValue dataGenerator="Y">` must reference a `<DataGenerator name="Y" ...>`
  declared in `<DataGenerators>`.
- For each custom (non-built-in) `<DataExtractor registeredName="...">`, there must be a Spring
  bean whose `registeredName` property matches, with `parent="auditModelExtractorBase"`.
  - **FLAG as ERROR** a `registeredName` with no matching bean (the application fails to register
    or records nothing).

## Java Extractor Validation
- If a `*DataExtractor.java` exists, it must `extends AbstractDataExtractor` and implement
  `isSupported` and `extractData`.
- If a `*DataGenerator.java` exists, it must `extends AbstractDataGenerator`.

## Registration Validation
- The audit model must be registered via an `AuditModelRegistrationBean`
  (`init-method="registerModel"`) whose `auditModelUrl` points at the audit XML on the classpath.
- The registering context must be imported from `module-context.xml`.
- **WARN** if `<PathMappings>` is absent while `dataSource` paths reference a producer path that
  is not mapped into the application namespace.

## Output
Report all violations with file path, line number, rule violated, and suggested fix. If no
violations found, confirm the audit application is valid.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.