The documentation includes general guidance on adding coding rules, including which languages support adding custom rules, and general guidance on how to go about it.
If the docs don’t answer your question, please tell us:
What language are you writing rules for? Java
What have you tried, and what’s your challenge / stumbling block : Unable to add new rule using REST API call /Postman and getting 401
post call: http://localhost:9099/api/rules/create
with authentication ,
Please share the relevant code snippet, along with any error messages you’re encountering:sample request for rule:{
“key” : “squid:S2068”,
“name” : “sample_rule”,
“description” :“Credentials should not be hard-coded”,
“language”:“java”,
“type”:“Vulnerability”,
“severity”:“Blocker”,
“tags”:“cert,cwe,owasp-a2,sans-top25-porous”
Hi @ganncamp
Thanks for the confirmation,
As i understand from your comment that , we cannot use REST API for adding new rules on existing java rules/existing template, by using java plugin only we can add new rules which are not exist in Sonarqube.
We are in process to add new AEM specific rules on Sonarqube as part of AEM as cloud migration.
We will check other plugin options to add AEM specific rules and keep you posted if anything required.
Thanks again.