AppThreat / atom

Atom is a novel intermediate representation for applications and a standalone tool that is powered by chen.
https://appthreat.com
Apache License 2.0
43 stars 2 forks source link

Add annotations to usage slice #47

Closed prabhu closed 1 year ago

prabhu commented 1 year ago

Annotations could also added to usage slices. When adding annotations, all of the annotations of a given method or class must be added with references to the className and methodName along with lineNumber and columnNumber. In addition, all of the attributes of the annotation must be retained.

Example:

@GetMapping(value = { "/", "/home" })
public String home(Model model, HttpSession session) {

https://github.com/HooliCorp/vuln-spring/blob/master/src/main/java/com/example/vulnspring/WebController.java#L46

In the above example, we need to retain information such as:

If a method or a class has multiple annotations, then every annotation must be captured. The hierarchy could also be captured if an annotation is a sub-class of another annotation.