audit-config-validator
Skill14 starsChanged 5 months agoApache-2.0View on GitHub
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.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/aiup-alfresco.mdcCursor rule
- aca-extensionSkill
- actionsSkill
- aikauSkill
- aiup-alfrescoSkill
- alfresco-architect-agentSkill
- alfresco-debugger-agentSkill
- alfresco-migrator-agentSkill
- audit-config-validatorSkill
- auditSkill
- behavioursSkill
- bootstrap-loaderSkill
- content-modelSkill
- content-model-validatorSkill
- content-storeSkill
- docker-compose-healthcheck-injectorSkill
- docker-composeSkill
- event-api-topology-checkerSkill
- eventsSkill
- metadata-extractorSkill
- migration-advisorSkill
- permission-aware-query-builderSkill
- permission-model-validatorSkill
- permissionsSkill
- repository-patchSkill
- requirementsSkill
- rest-apiSkill
- rest-api-validatorSkill
- rule-conditionsSkill
- scaffoldSkill
- scheduled-jobsSkill
- sdk-version-detectorSkill
- share-configSkill
- subsystemSkill
- surfSkill
- testSkill
- transformsSkill
- web-scriptsSkill
- workflow-bpmn-validatorSkill
- workflowSkill
- content-model-validatorSkill
- docker-compose-healthcheck-injectorSkill
- event-api-topology-checkerSkill
- migration-advisorSkill
- permission-aware-query-builderSkill
- permission-model-validatorSkill
- rest-api-validatorSkill
- sdk-version-detectorSkill
- workflow-bpmn-validatorSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
FLAG as ERROR: if no audit.{app-key}.enabled property is present in a companion .properties file matching the key exactly.
- Very specific: line 21
WARN: if audit.enabled=true (the master switch) is not present anywhere in the project.
- Very specific: line 24
Every <RecordValue dataExtractor="X"> must reference a <DataExtractor name="X" ...> declared in <DataExtractors>.
- Very specific: line 34
If a *DataExtractor.java exists, it must extends AbstractDataExtractor and implement isSupported and extractData.
- Very specific: line 36
If a *DataGenerator.java exists, it must extends AbstractDataGenerator.
- Very specific: line 42
WARN: if <PathMappings> is absent while dataSource paths reference a producer path that is not mapped into the application namespace.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

