Audit config validator
Skill aborroy/aiup-alfresco/.cursor/skills/audit-config-validator
A Claude Code plugin that packages Alfresco extension development as slash commands, skills, and agents
npx -y skills add aborroy/aiup-alfresco --skill audit-config-validatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
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.
SKILL.md
2.6 KB, as published. Nobody here has run it
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 namespacehttp://www.alfresco.org/repo/audit/model/3.2. - There must be exactly one
<Application>with bothnameandkeyattributes.
Application Key / Enable Consistency
- The
<Application key="{app-key}">value must be lowercase and prefix-scoped. - FLAG as ERROR if no
audit.{app-key}.enabledproperty is present in a companion.propertiesfile matching thekeyexactly.- 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 whoseregisteredNameproperty matches, withparent="auditModelExtractorBase".- FLAG as ERROR a
registeredNamewith no matching bean (the application fails to register or records nothing).
- FLAG as ERROR a
Java Extractor Validation
- If a
*DataExtractor.javaexists, it mustextends AbstractDataExtractorand implementisSupportedandextractData. - If a
*DataGenerator.javaexists, it mustextends AbstractDataGenerator.
Registration Validation
- The audit model must be registered via an
AuditModelRegistrationBean(init-method="registerModel") whoseauditModelUrlpoints at the audit XML on the classpath. - The registering context must be imported from
module-context.xml. - WARN if
<PathMappings>is absent whiledataSourcepaths 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.