Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/main/java/de/rub/nds/scanner/core/execution/Scanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
import de.rub.nds.scanner.core.guideline.Guideline;
import de.rub.nds.scanner.core.guideline.GuidelineChecker;
import de.rub.nds.scanner.core.passive.StatsWriter;
import de.rub.nds.scanner.core.probe.AnalyzedProperty;
import de.rub.nds.scanner.core.probe.ScannerProbe;
import de.rub.nds.scanner.core.probe.result.TestResults;
import de.rub.nds.scanner.core.report.ScanReport;
import de.rub.nds.scanner.core.report.rating.ScoreReport;
import de.rub.nds.scanner.core.report.rating.SiteReportRater;
Expand Down Expand Up @@ -202,6 +204,13 @@ public ReportT scan() {
return report;
}

// prefill report with NOT_TESTED_YET for all scheduled probes
for (ProbeT probe : probeList) {
for (AnalyzedProperty property : probe.getAnalyzedProperties()) {
report.putResult(property, TestResults.NOT_TESTED_YET);
}
}

// Scan Execution
LOGGER.debug("Starting scan execution");
ScanJob<ReportT, ProbeT, AfterProbeT, StateT> scanJob = new ScanJob<>(probeList, afterList);
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/de/rub/nds/scanner/core/probe/ScannerProbe.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ protected final void register(AnalyzedProperty... properties) {
}
}

public Set<AnalyzedProperty> getAnalyzedProperties() {
return propertiesMap.keySet();
}

public final <T> void putIfFalse(
AnalyzedProperty determiningProperty,
AnalyzedProperty propertyToSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public enum TestResults implements SummarizableTestResult {
COULD_NOT_TEST,
ERROR_DURING_TEST,
UNCERTAIN,
UNSUPPORTED,
NOT_IMPLEMENTED,
NOT_SCHEDULED,
NOT_TESTED_YET,
UNASSIGNED_ERROR,
TIMEOUT;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/rub/nds/scanner/core/report/ScanReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ public synchronized Map<AnalyzedProperty, TestResult> getResultMap() {
* Returns the test result for a specific property.
*
* @param property the property to get the result for
* @return the test result, or NOT_TESTED_YET if not found
* @return the test result, or NOT_SCHEDULED if not found
*/
public synchronized TestResult getResult(AnalyzedProperty property) {
return resultMap.getOrDefault(property, TestResults.NOT_TESTED_YET);
return resultMap.getOrDefault(property, TestResults.NOT_SCHEDULED);
}

/**
Expand Down