org.owasp.orizon.library
Class Recipe
java.lang.Object
org.owasp.orizon.O
org.owasp.orizon.xml.Reader
org.owasp.orizon.library.Recipe
public class Recipe
- extends Reader
This class models a recipe, an XML file stored in the library and containing
security checks
This is an example of a good Orizon recipe...
<!-- this is recipe named "test" that requires at least orizon x.y to be
used -->
<recipe family="test family" name="test"
description="this is a test recipe"
applies="language"
requires="x.y">
<check id="O_XX_n"> severity="" impact="";
</check>
</recipe>
- Since:
- 0.25
- Author:
- sp0nge
|
Constructor Summary |
Recipe(java.lang.String xmlFilename)
|
Recipe(java.lang.String xmlFilename,
boolean newRecipe)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Recipe
public Recipe(java.lang.String xmlFilename,
boolean newRecipe)
Recipe
public Recipe(java.lang.String xmlFilename)
calcCRC
public long calcCRC()
isGoodRecipe
public boolean isGoodRecipe(long code)
write
public final boolean write()
setRootTag
protected final boolean setRootTag(java.lang.String root)
addCheck
public final boolean addCheck(java.lang.String check)
read
public boolean read()
- Specified by:
read in class Reader
getCrc
public long getCrc()
getCheck
public final Check getCheck(int i)
getDescription
public final java.lang.String getDescription()
setDescription
public final void setDescription(java.lang.String description)
getFamily
public final java.lang.String getFamily()
setFamily
public final void setFamily(java.lang.String family)
getLanguage
public final int getLanguage()
setLanguage
public final void setLanguage(int language)
getChecksCount
public final int getChecksCount()
setJericho
public final void setJericho(boolean v)
- Choose if this recipe is for static code review
- Parameters:
v -
getJericho
public final boolean getJericho()
setDawn
public final void setDawn(boolean v)
getDawn
public final boolean getDawn()
check
public boolean check(Check c)
- Description copied from class:
O
- As far from version 0.62 all items must be responsible for checking
themselves for security vulnerabilities.
- Specified by:
check in class O
- Parameters:
c - the security check that must be applied
- Returns:
- true if a security issue as been found or false
otherwise