Skip to content

Commit

Permalink
add cwe to rule interface
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusAlbrecht committed Jun 18, 2024
1 parent 03f31b2 commit d1f9e99
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import de.fraunhofer.aisec.cpg.TranslationResult

interface Rule {
/** the query result, one of the members has to be `null` */
var queryResult: Pair<QueryTree<*>?, Pair<Boolean, List<*>>?>?
var queryResult: QueryTree<*>? /* Pair<QueryTree<*>?, Pair<Boolean, List<*>>?>? */

// consider
// https://github.com/microsoft/sarif-tutorials/blob/main/docs/Authoring-rule-metadata-and-result-messages.md
Expand All @@ -41,6 +41,16 @@ interface Rule {

/** human readable name of the query */
val name: String
/**
* !!only the number!!
*
* something like "CWE-123" WILL break stuff
*
* TODO consider validation
*/
val cweId: String?
get() = null

val shortDescription: String
val mdShortDescription: String?
get() = null
Expand Down

0 comments on commit d1f9e99

Please sign in to comment.