Actions
Bug #20142
openInvalid metadata (section with empty name) generated by the technique editor
Pull Request:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
Description
While working on the CIS technique for rhel7 in rudder language, I ended up with a broken metadata.xml, resulting in a broken technique.
No errors where detected or thrown by the technique editor, but my technique does not appear in the directive webapp page nor in the technique tree.
The webapp logs are raising the following errors:
[2021-10-11 14:13:22+0000] ERROR application - An error occurred when compiling technique 'My technique name' (id : 'BundleName(CIS_rhel7_setup_filesystem)') with rudderc, error details in /var/log/rudder/rudderc/failures/2021-10-11T14:13:22.704Z_CIS_rhel7_setup_filesystem.log, falling back to old saving process [2021-10-11 14:13:23+0000] ERROR techniques.reader - Error with technique at path: '/ncf_techniques/CIS_rhel7_setup_filesystem/1.0/metadata.xml', it will be ignored. Error: Chained: Couldn't parse Section in CIS_rhel7_setup_filesystem/1.0 -> My technique name for XML: <SECTION reporting="sum" name="Initial Setup" multivalued="true" component="true"> <SECTION reporting="sum" name="Additional Process Hardening" multivalued="true" component="true"> <SECTION reporting="sum" name="Ensure XD/NX support is enabled" multivalued="true" component="true"> <SECTION name="Condition from command" multivalued="true" component="true"> <REPORTKEYS> <VALUE>xd_nx_support_enabled</VALUE> </REPORTKEYS> </SECTION> <SECTION name="Report if condition" multivalued="true" component="true"> <REPORTKEYS> <VALUE>Ensure core dumps are restricted</VALUE>I could not find what the issue was, the xml seems correct (xmllint accepts it).
The metadata.xml is pretty big, and is attached in the ticket. There are two issues here:
- The technique should not be saved and failing silently in the technique editor if the metadata.xml is incorrect
- The metadata does not seem to work as intended
Files
Actions