org.owasp.orizon.library
Class Recipe

java.lang.Object
  extended by org.owasp.orizon.O
      extended by org.owasp.orizon.xml.Reader
          extended by 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

Field Summary
 
Fields inherited from class org.owasp.orizon.xml.Reader
doc, docBuilder, docBuilderFactory, result_ready, xmlFilename
 
Fields inherited from class org.owasp.orizon.O
base64, hasName, initialized, line_start, line_stop, log, name, reduced, what
 
Constructor Summary
Recipe(java.lang.String xmlFilename)
           
Recipe(java.lang.String xmlFilename, boolean newRecipe)
           
 
Method Summary
 boolean addCheck(java.lang.String check)
           
 long calcCRC()
           
 boolean check(Check c)
          As far from version 0.62 all items must be responsible for checking themselves for security vulnerabilities.
 Check getCheck(int i)
           
 int getChecksCount()
           
 long getCrc()
           
 boolean getDawn()
           
 java.lang.String getDescription()
           
 java.lang.String getFamily()
           
 boolean getJericho()
           
 int getLanguage()
           
 boolean isGoodRecipe(long code)
           
 boolean read()
           
 void setDawn(boolean v)
           
 void setDescription(java.lang.String description)
           
 void setFamily(java.lang.String family)
           
 void setJericho(boolean v)
          Choose if this recipe is for static code review
 void setLanguage(int language)
           
protected  boolean setRootTag(java.lang.String root)
           
 boolean write()
           
 
Methods inherited from class org.owasp.orizon.xml.Reader
areResultsReady, dispose, getDocumentRoot, getXmlFilename, isGoodDocumentRoot, isSupported, readXmlNode
 
Methods inherited from class org.owasp.orizon.O
clone, getName, getStartLine, getStopLine, isCompatible, isInitialized, setName, setStartLine, setStopLine, trackThis
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Recipe

public Recipe(java.lang.String xmlFilename,
              boolean newRecipe)

Recipe

public Recipe(java.lang.String xmlFilename)
Method Detail

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