Commit 81f7ee6c authored by Paff's avatar Paff
Browse files

transformations trustlevel and critical port

changes caused by cpe
config for analysis
tool 
parent af6915d0
L01-List-Filters 1
L02-List-Critical-Ports 1
L03-List-Incoming-Ports 1
L04-List-Outgoing-Ports 1
L05-List-Ports-String 1
L06-List-Third-Party-Components 1
L07-List-Not-Reviewed-Configuration 1
D01-Derive-Role-Component 1
D02-Derive-Role-Port 1
D03-Derive-Role-Third-Party-Component 1
D04-Derive-Trustlevel-Component 1
E01-Unencrypted-Connector-In-Path 1
E02-Encrypted-Path-Continues-Unencrypted 1
E03-Enrypted-Path-continues-Unencrypted 1
E04-Trustlevel-Unencrypted-Path-In-Low 1
E05-Unencrypted-Path-End-In-Low-Trustlevel 1
E06-Trustlevel-Connector-Higher 1
I01-Encrypted-Connector 1
I02-Trustlevel-Client-Server 1
I03-Roles-Defined 1
F01-Taint-Tracking 1
F02-High-Trustlevel 1
T01-Reason-Trustlevel 1
T02-High-Trustlevel 1
WI01Access-Roles 1
WI02-Third-Party-Component-Security 1
WI03-Low-Trustlevel 1
WI04-Critical-Ports 1
\ No newline at end of file
...@@ -21,6 +21,7 @@ import secarc.ets.check.MontiSecArcAnalysisCreator; ...@@ -21,6 +21,7 @@ import secarc.ets.check.MontiSecArcAnalysisCreator;
import secarc.ets.check.MontiSecArcAnalysisVisitor; import secarc.ets.check.MontiSecArcAnalysisVisitor;
import secarc.ets.check.MontiSecArcAnalysisWorkflow; import secarc.ets.check.MontiSecArcAnalysisWorkflow;
import secarc.ets.transform.PreCoCoCheckMontiSecArcTransformationWorkflow; import secarc.ets.transform.PreCoCoCheckMontiSecArcTransformationWorkflow;
import secarc.ets.transform.criticalport.PreAnalysisCriticalPortTransformationWorkflow;
import secarc.ets.transform.trustlevel.PreAnalysisTrustlevelTransformationWorkflow; import secarc.ets.transform.trustlevel.PreAnalysisTrustlevelTransformationWorkflow;
/** /**
...@@ -41,15 +42,15 @@ public final class MontiSecArcAnalysis extends MontiSecArc { ...@@ -41,15 +42,15 @@ public final class MontiSecArcAnalysis extends MontiSecArc {
/** /**
* Factory method for {@link MontiSecArcAnalysis}.l * Factory method for {@link MontiSecArcAnalysis}.l
*/ */
public static MontiSecArcAnalysis newLanguage(ILanguage component, List<String> analysisParameter, boolean critical) { public static MontiSecArcAnalysis newLanguage(ILanguage component, List<String> analysisParameter, boolean critical, String analysisConfPath) {
return new MontiSecArcAnalysis(component, analysisParameter, critical); return new MontiSecArcAnalysis(component, analysisParameter, critical, analysisConfPath);
} }
/** /**
* Constructor for secarc.MontiSecArcAnalysis * Constructor for secarc.MontiSecArcAnalysis
*/ */
@Inject @Inject
public MontiSecArcAnalysis(final ILanguage component, List<String> analysisParameter, boolean critical) { public MontiSecArcAnalysis(final ILanguage component, List<String> analysisParameter, boolean critical, String analysisConfPath) {
super(component); super(component);
// PARSING-SETUP // PARSING-SETUP
...@@ -78,7 +79,7 @@ public final class MontiSecArcAnalysis extends MontiSecArc { ...@@ -78,7 +79,7 @@ public final class MontiSecArcAnalysis extends MontiSecArc {
//Workflow for Analysis //Workflow for Analysis
MontiSecArcAnalysisWorkflow<MontiSecArcRoot> analysisWorkflow = new MontiSecArcAnalysisWorkflow<MontiSecArcRoot>(LANGUAGE_ROOT); MontiSecArcAnalysisWorkflow<MontiSecArcRoot> analysisWorkflow = new MontiSecArcAnalysisWorkflow<MontiSecArcRoot>(LANGUAGE_ROOT);
//AnalysisCreator //AnalysisCreator
analysisWorkflow.setAnalysis(MontiSecArcAnalysisCreator.createAnalysis()); analysisWorkflow.setAnalysis(MontiSecArcAnalysisCreator.createAnalysis(analysisConfPath));
//AnalysisConfiguratin //AnalysisConfiguratin
analysisWorkflow.setAnalysisConfiguration(MontiSecArcAnalysisCreator.createConfig()); analysisWorkflow.setAnalysisConfiguration(MontiSecArcAnalysisCreator.createConfig());
//Visitor for Analysis //Visitor for Analysis
...@@ -103,7 +104,7 @@ public final class MontiSecArcAnalysis extends MontiSecArc { ...@@ -103,7 +104,7 @@ public final class MontiSecArcAnalysis extends MontiSecArc {
//Workflow for Analysis //Workflow for Analysis
MontiSecArcAnalysisWorkflow<MontiSecArcRoot> analysisTransformWorkflow = new MontiSecArcAnalysisWorkflow<MontiSecArcRoot>(LANGUAGE_ROOT); MontiSecArcAnalysisWorkflow<MontiSecArcRoot> analysisTransformWorkflow = new MontiSecArcAnalysisWorkflow<MontiSecArcRoot>(LANGUAGE_ROOT);
//AnalysisCreator //AnalysisCreator
analysisTransformWorkflow.setAnalysis(MontiSecArcAnalysisCreator.createAnalysis()); analysisTransformWorkflow.setAnalysis(MontiSecArcAnalysisCreator.createAnalysis(analysisConfPath));
//AnalysisConfiguratin //AnalysisConfiguratin
analysisTransformWorkflow.setAnalysisConfiguration(MontiSecArcAnalysisCreator.createConfig()); analysisTransformWorkflow.setAnalysisConfiguration(MontiSecArcAnalysisCreator.createConfig());
//Visitor for Analysis //Visitor for Analysis
...@@ -121,7 +122,8 @@ public final class MontiSecArcAnalysis extends MontiSecArc { ...@@ -121,7 +122,8 @@ public final class MontiSecArcAnalysis extends MontiSecArc {
//Add Workflow for Analysis for advanced users: what if //Add Workflow for Analysis for advanced users: what if
addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_ADVANCED_WHAT_IF, analysisTransformWorkflow); addExecutionUnit(MontiSecArcConstants.ANALYSIS_WORKFLOW_ADVANCED_WHAT_IF, analysisTransformWorkflow);
PreAnalysisCriticalPortTransformationWorkflow<MontiSecArcRoot> criticalPortTransformationWorkflow = new PreAnalysisCriticalPortTransformationWorkflow<MontiSecArcRoot>(MontiSecArcRoot.class);
addExecutionUnit("transformCriticalPort", criticalPortTransformationWorkflow);
} }
/** /**
......
...@@ -34,7 +34,8 @@ public class MontiSecArcAnalysisTool extends ETSTool { ...@@ -34,7 +34,8 @@ public class MontiSecArcAnalysisTool extends ETSTool {
MCG.initMonticoreGlobals(); MCG.initMonticoreGlobals();
List<String> analysisParameter = getAnalysisParameter(arguments); List<String> analysisParameter = getAnalysisParameter(arguments);
boolean critical = isAnalysisCritical(arguments); boolean critical = isAnalysisCritical(arguments);
MontiSecArcAnalysisTool tool = new MontiSecArcAnalysisTool(cleanArgumentList(arguments), analysisParameter, critical); String analysisConfPath = getAnalysisConfPath(arguments);
MontiSecArcAnalysisTool tool = new MontiSecArcAnalysisTool(cleanArgumentList(arguments), analysisParameter, critical, analysisConfPath);
tool.init(); tool.init();
tool.run(); tool.run();
...@@ -56,6 +57,27 @@ public class MontiSecArcAnalysisTool extends ETSTool { ...@@ -56,6 +57,27 @@ public class MontiSecArcAnalysisTool extends ETSTool {
return false; return false;
} }
/**
* Path to config file
*
* @param arguments
* @return String path to config file
*/
protected static String getAnalysisConfPath(String[] arguments) {
boolean confpathExists = false;
for(String argument : arguments) {
if(argument.equals(MontiSecArcConstants.ARG_ANALYSISCONFPATH)) {
confpathExists = true;
continue;
}
if(confpathExists) {
return argument;
}
}
return "";
}
/** /**
* Searches for analysis parameters * Searches for analysis parameters
* *
...@@ -94,6 +116,7 @@ public class MontiSecArcAnalysisTool extends ETSTool { ...@@ -94,6 +116,7 @@ public class MontiSecArcAnalysisTool extends ETSTool {
protected static String[] cleanArgumentList(String[] arguments) { protected static String[] cleanArgumentList(String[] arguments) {
List<String> cleanedArguments = new ArrayList<String>(); List<String> cleanedArguments = new ArrayList<String>();
boolean isAnalysisParameter = false; boolean isAnalysisParameter = false;
boolean isAnalysisConfPath = false;
for(String argument : arguments) { for(String argument : arguments) {
if(argument.equals(MontiSecArcConstants.ANALYSIS_CIRITICAL_PORTS)) { if(argument.equals(MontiSecArcConstants.ANALYSIS_CIRITICAL_PORTS)) {
continue; continue;
...@@ -105,6 +128,17 @@ public class MontiSecArcAnalysisTool extends ETSTool { ...@@ -105,6 +128,17 @@ public class MontiSecArcAnalysisTool extends ETSTool {
continue; continue;
} }
if(argument.equals(MontiSecArcConstants.ARG_ANALYSISCONFPATH)) {
isAnalysisConfPath = true;
continue;
}
if(isAnalysisConfPath) {
isAnalysisConfPath = false;
continue;
}
if(isAnalysisParameter) { if(isAnalysisParameter) {
//New parameter //New parameter
if(argument.contains("-") || argument.contains("/")) { if(argument.contains("-") || argument.contains("/")) {
...@@ -125,14 +159,14 @@ public class MontiSecArcAnalysisTool extends ETSTool { ...@@ -125,14 +159,14 @@ public class MontiSecArcAnalysisTool extends ETSTool {
* *
* @param arguments * @param arguments
*/ */
public MontiSecArcAnalysisTool(String[] arguments, List<String> analysisParameter, boolean critical) { public MontiSecArcAnalysisTool(String[] arguments, List<String> analysisParameter, boolean critical, String analysisConfPath) {
super(arguments); super(arguments);
Injector injector = Guice.createInjector(new MontiSecArcDefaultModule()); Injector injector = Guice.createInjector(new MontiSecArcDefaultModule());
InjectorProvider.setInjector(injector); InjectorProvider.setInjector(injector);
LanguageFamily languageFamily = new LanguageFamily(); LanguageFamily languageFamily = new LanguageFamily();
languageFamily.addLanguage(MontiSecArcAnalysis.newLanguage(injector.getInstance(MontiSecArcComponent.class), analysisParameter, critical)); languageFamily.addLanguage(MontiSecArcAnalysis.newLanguage(injector.getInstance(MontiSecArcComponent.class), analysisParameter, critical, analysisConfPath));
setLanguages(languageFamily); setLanguages(languageFamily);
// set default CoCos // set default CoCos
......
...@@ -25,6 +25,6 @@ public interface ISecAnalysisComponentChecker { ...@@ -25,6 +25,6 @@ public interface ISecAnalysisComponentChecker {
* @param entry * @param entry
* @throws AmbigousException * @throws AmbigousException
*/ */
void check(ASTArcComponent node, SecComponentEntry entry, boolean advanced) throws AmbigousException; int check(ASTArcComponent node, SecComponentEntry entry, boolean advanced) throws AmbigousException;
} }
...@@ -23,6 +23,6 @@ public interface ISecAnalysisConfigurationChecker { ...@@ -23,6 +23,6 @@ public interface ISecAnalysisConfigurationChecker {
* @param node * @param node
* @param entry * @param entry
*/ */
void check(ASTSecArcConfiguration node, ConfigurationEntry entry, boolean advanced); int check(ASTSecArcConfiguration node, ConfigurationEntry entry, boolean advanced);
} }
...@@ -27,7 +27,7 @@ public interface ISecAnalysisConnectorChecker { ...@@ -27,7 +27,7 @@ public interface ISecAnalysisConnectorChecker {
* @param entry * @param entry
* @throws AmbigousException * @throws AmbigousException
*/ */
void check(ASTArcConnector node, SecConnectorEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException; int check(ASTArcConnector node, SecConnectorEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException;
/** /**
* *
...@@ -35,6 +35,6 @@ public interface ISecAnalysisConnectorChecker { ...@@ -35,6 +35,6 @@ public interface ISecAnalysisConnectorChecker {
* @param entry entry related connector entry to be checked * @param entry entry related connector entry to be checked
* @throws AmbigousException * @throws AmbigousException
*/ */
void check(ASTArcSimpleConnector node, SecConnectorEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException; int check(ASTArcSimpleConnector node, SecConnectorEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException;
} }
...@@ -27,6 +27,6 @@ public interface ISecAnalysisFilterChecker { ...@@ -27,6 +27,6 @@ public interface ISecAnalysisFilterChecker {
* @param graph * @param graph
* @throws AmbigousException * @throws AmbigousException
*/ */
void check(ASTSecArcFilter node, FilterEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException;; int check(ASTSecArcFilter node, FilterEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException;;
} }
...@@ -27,6 +27,6 @@ public interface ISecAnalysisIdentityChecker { ...@@ -27,6 +27,6 @@ public interface ISecAnalysisIdentityChecker {
* @param graph * @param graph
* @throws AmbigousException * @throws AmbigousException
*/ */
void check(ASTSecArcIdentity node, IdentityEntry entry, ArchitectureGraph graphConnectorEdges, ArchitectureGraph graphIdentityEdges, boolean advanced) throws AmbigousException; int check(ASTSecArcIdentity node, IdentityEntry entry, ArchitectureGraph graphConnectorEdges, ArchitectureGraph graphIdentityEdges, boolean advanced) throws AmbigousException;
} }
...@@ -27,6 +27,6 @@ public interface ISecAnalysisPortChecker { ...@@ -27,6 +27,6 @@ public interface ISecAnalysisPortChecker {
* @param graph * @param graph
* @throws AmbigousException * @throws AmbigousException
*/ */
void check(ASTArcPort node, SecPortEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException; int check(ASTArcPort node, SecPortEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException;
} }
...@@ -27,6 +27,6 @@ public interface ISecAnalysisRoleChecker { ...@@ -27,6 +27,6 @@ public interface ISecAnalysisRoleChecker {
* @param graph * @param graph
* @throws AmbigousException * @throws AmbigousException
*/ */
void check(ASTSecArcRole node, RoleEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException; int check(ASTSecArcRole node, RoleEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException;
} }
...@@ -26,6 +26,6 @@ public interface ISecAnalysisTrustlevelRelationChecker { ...@@ -26,6 +26,6 @@ public interface ISecAnalysisTrustlevelRelationChecker {
* @param graph * @param graph
* @throws AmbigousException * @throws AmbigousException
*/ */
void check(ASTSecArcTrustlevelRelation node, TrustlevelRelationEntry entry, boolean advanced) throws AmbigousException; int check(ASTSecArcTrustlevelRelation node, TrustlevelRelationEntry entry, boolean advanced) throws AmbigousException;
} }
...@@ -11,7 +11,7 @@ import secarc.ets.check.MontiSecArcAnalysisConstants; ...@@ -11,7 +11,7 @@ import secarc.ets.check.MontiSecArcAnalysisConstants;
import secarc.ets.entries.SecComponentEntry; import secarc.ets.entries.SecComponentEntry;
/** /**
* Lists all third party components with configuration and version * L01: Lists all third party components with configuration and version
* *
* <br> * <br>
* <br> * <br>
...@@ -24,9 +24,15 @@ import secarc.ets.entries.SecComponentEntry; ...@@ -24,9 +24,15 @@ import secarc.ets.entries.SecComponentEntry;
*/ */
public class ListThirdPartyComponents extends Analysis implements public class ListThirdPartyComponents extends Analysis implements
ISecAnalysisComponentChecker { ISecAnalysisComponentChecker {
/**
* Factor rating of analysis
*/
private int factor = 1;
public ListThirdPartyComponents() { public ListThirdPartyComponents(int factor) {
super(MontiSecArcAnalysisConstants.LIST_THIRD_PARTY_COMPONENTS); super(MontiSecArcAnalysisConstants.LIST_THIRD_PARTY_COMPONENTS);
this.factor = factor;
} }
/* /*
...@@ -34,11 +40,14 @@ public class ListThirdPartyComponents extends Analysis implements ...@@ -34,11 +40,14 @@ public class ListThirdPartyComponents extends Analysis implements
* @see secarc.ets.analysis.checker.ISecAnalysisComponentChecker#check(mc.umlp.arcd._ast.ASTArcComponent, secarc.ets.entries.SecComponentEntry) * @see secarc.ets.analysis.checker.ISecAnalysisComponentChecker#check(mc.umlp.arcd._ast.ASTArcComponent, secarc.ets.entries.SecComponentEntry)
*/ */
@Override @Override
public void check(ASTArcComponent node, SecComponentEntry entry, boolean advanced) public int check(ASTArcComponent node, SecComponentEntry entry, boolean advanced)
throws AmbigousException { throws AmbigousException {
if(entry.getConfiguration() != null && entry.getVersion() != null) { if(entry.getConfiguration() != null && entry.getCPE() != null) {
addReport("The third party component " + NameHelper.getSimplenameFromComplexname(entry.getName()) + " has the version " + entry.getVersion().getVersion() + " and configuration " + entry.getConfiguration().getName() + ".", node.get_SourcePositionStart()); addReport("The third party component " + NameHelper.getSimplenameFromComplexname(entry.getName()) + " has the version " + entry.getCPE().getCPE() + " and configuration " + entry.getConfiguration().getName() + ".", node.get_SourcePositionStart());
return factor;
} }
return 0;
} }
/* /*
......
...@@ -9,7 +9,7 @@ import secarc.ets.check.MontiSecArcAnalysisConstants; ...@@ -9,7 +9,7 @@ import secarc.ets.check.MontiSecArcAnalysisConstants;
import secarc.ets.entries.ConfigurationEntry; import secarc.ets.entries.ConfigurationEntry;
/** /**
* Checks if a configuration is reviewed. * L07: Checks if a configuration is reviewed.
* Information gathering: * Information gathering:
* - Testing for Web application fingerpring * - Testing for Web application fingerpring
* - Application discovery * - Application discovery
...@@ -28,19 +28,27 @@ import secarc.ets.entries.ConfigurationEntry; ...@@ -28,19 +28,27 @@ import secarc.ets.entries.ConfigurationEntry;
public class ReviewedConfiguration extends Analysis implements public class ReviewedConfiguration extends Analysis implements
ISecAnalysisConfigurationChecker { ISecAnalysisConfigurationChecker {
public ReviewedConfiguration() { /**
* Factor rating of analysis
*/
private int factor = 1;
public ReviewedConfiguration(int factor) {
super(MontiSecArcAnalysisConstants.REVIEWED_CONFIGURATION); super(MontiSecArcAnalysisConstants.REVIEWED_CONFIGURATION);
this.factor = factor;
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see secarc.ets.analysis.checker.ISecConfigurationChecker#check(secarc._ast.ASTSecArcConfiguration, secarc.ets.entries.ConfigurationEntry) * @see secarc.ets.analysis.checker.ISecConfigurationChecker#check(secarc._ast.ASTSecArcConfiguration, secarc.ets.entries.ConfigurationEntry)
*/ */
public void check(ASTSecArcConfiguration node, ConfigurationEntry entry, boolean advanced) { public int check(ASTSecArcConfiguration node, ConfigurationEntry entry, boolean advanced) {
String name = entry.getName(); String name = entry.getName();
if(!name.endsWith("_reviewed")) { if(!name.endsWith("_reviewed")) {
addReport("The configuration " + name + " is not reviewed, yet. After the configuration is reviewed, a \"_reviewed\" must be added to the configuration's name.", node.get_SourcePositionStart()); addReport("The configuration " + name + " is not reviewed, yet. After the configuration is reviewed, a \"_reviewed\" must be added to the configuration's name.", node.get_SourcePositionStart());
return factor;
} }
return 0;
} }
/* /*
......
...@@ -21,7 +21,7 @@ import secarc.ets.graph.Edge; ...@@ -21,7 +21,7 @@ import secarc.ets.graph.Edge;
import secarc.ets.graph.Vertex; import secarc.ets.graph.Vertex;
/** /**
* Checks if an encrypted path continues unencrypted. * E03: Checks if an encrypted path continues unencrypted.
* Then the message is readable for the following components * Then the message is readable for the following components
* *
* <br> * <br>
...@@ -36,19 +36,25 @@ import secarc.ets.graph.Vertex; ...@@ -36,19 +36,25 @@ import secarc.ets.graph.Vertex;
public class EncryptedPathContinuesUnencrypted extends Analysis implements public class EncryptedPathContinuesUnencrypted extends Analysis implements
ISecAnalysisPortChecker { ISecAnalysisPortChecker {
public EncryptedPathContinuesUnencrypted() { /**
* Factor rating of analysis
*/
private int factor = 1;
public EncryptedPathContinuesUnencrypted(int factor) {
super(MontiSecArcAnalysisConstants.ENCRYPTED_PATH_CONTINUES_UNENCRYPTED); super(MontiSecArcAnalysisConstants.ENCRYPTED_PATH_CONTINUES_UNENCRYPTED);
this.factor = factor;
} }
@Override @Override
public void check(ASTArcPort node, SecPortEntry entry, public int check(ASTArcPort node, SecPortEntry entry,
ArchitectureGraph graph, boolean advanced) throws AmbigousException { ArchitectureGraph graph, boolean advanced) throws AmbigousException {
//Checks if the port is a target of an encrypted connection //Checks if the port is a target of an encrypted connection
ConnectorEntry connectorEntry = AnalysisHelper.isPortBenningOfPath(entry, graph); ConnectorEntry connectorEntry = AnalysisHelper.isPortBenningOfPath(entry, graph);
//No encryption before //No encryption before
if(connectorEntry == null || ((SecConnectorEntry) connectorEntry).isUnencrypted()) { if(connectorEntry == null || ((SecConnectorEntry) connectorEntry).isUnencrypted()) {
return; return 0;
} }
Vertex<PortEntry> portVertex = Vertex.of(entry); Vertex<PortEntry> portVertex = Vertex.of(entry);
...@@ -102,7 +108,9 @@ public class EncryptedPathContinuesUnencrypted extends Analysis implements ...@@ -102,7 +108,9 @@ public class EncryptedPathContinuesUnencrypted extends Analysis implements
if(outputAllowed) { if(outputAllowed) {
addReport(sbuilder.toString(), node.get_SourcePositionStart()); addReport(sbuilder.toString(), node.get_SourcePositionStart());
return factor;
} }
return 0;
} }
@Override @Override
......
...@@ -24,7 +24,7 @@ import mc.umlp.arcd._ast.ASTArcPort; ...@@ -24,7 +24,7 @@ import mc.umlp.arcd._ast.ASTArcPort;
import mc.umlp.arcd.ets.entries.PortEntry; import mc.umlp.arcd.ets.entries.PortEntry;
/** /**
* Checks if a path consists of encrypted and unencrypted parts * E01: Checks if a path consists of encrypted and unencrypted parts
* *
* - SSL/TLS Testing * - SSL/TLS Testing
* *
...@@ -40,19 +40,25 @@ import mc.umlp.arcd.ets.entries.PortEntry; ...@@ -40,19 +40,25 @@ import mc.umlp.arcd.ets.entries.PortEntry;
public class EncryptedPathWithUnencryptedPart extends Analysis public class EncryptedPathWithUnencryptedPart extends Analysis
implements ISecAnalysisPortChecker { implements ISecAnalysisPortChecker {
public EncryptedPathWithUnencryptedPart() { /**
* Factor rating of analysis
*/
private int factor = 1;
public EncryptedPathWithUnencryptedPart(int factor) {
super(MontiSecArcAnalysisConstants.ENCRYPTED_PATH_WITH_UNENCRYPTED_PART); super(MontiSecArcAnalysisConstants.ENCRYPTED_PATH_WITH_UNENCRYPTED_PART);
this.factor = factor;
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see secarc.ets.cocos.checkers.ISecPortChecker#check(mc.umlp.arcd._ast.ASTArcPort, secarc.ets.entries.SecPortEntry) * @see secarc.ets.cocos.checkers.ISecPortChecker#check(mc.umlp.arcd._ast.ASTArcPort, secarc.ets.entries.SecPortEntry)
*/ */
public void check(ASTArcPort node, SecPortEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException{ public int check(ASTArcPort node, SecPortEntry entry, ArchitectureGraph graph, boolean advanced) throws AmbigousException{
//Checks if the path starts with this port //Checks if the path starts with this port
if(AnalysisHelper.isPortBenningOfPath(entry, graph) != null) {