-
Notifications
You must be signed in to change notification settings - Fork 243
Implemented retest feature #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thejohnbrown
wants to merge
2
commits into
blacklanternsecurity:github-dev
Choose a base branch
from
thejohnbrown:retest-feature
base: github-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import logging | ||
from .base import * | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
class Component(BaseComponent): | ||
|
||
default_name = 'Summary of Findings Status' | ||
htmlTemplate = 'componentTemplates/FindingsStatusList.html' | ||
iconType = 'fas fa-th-list' | ||
iconColor = 'var(--orange)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This css addition is no longer necessary, since this info should now just be put in the HTML template directly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
div.finding-group-name { | ||
padding: .5em; | ||
margin: .5em; | ||
font-weight: bold; | ||
font-size: 1.1em; | ||
width: 100%; | ||
text-align: center; | ||
} | ||
|
||
p.findings-status-summary-entry { | ||
padding: .5rem; | ||
padding-left: 1rem; | ||
padding-right: 1rem; | ||
margin: 0 10rem 2px calc(2rem + 4px); | ||
position: relative; | ||
background-color: #BEDDBA; | ||
} | ||
|
||
p.findings-status-summary-entry::before { | ||
content: ''; | ||
padding: 1rem; | ||
position: absolute; | ||
background-color: #7BB274; | ||
display: inline-block; | ||
left: calc(-2rem - 2px); | ||
bottom: 0; | ||
top: 0; | ||
} | ||
|
||
p.findings-status-summary-entry::after { | ||
content: attr(finding-status); | ||
padding: .5rem; | ||
padding-left: 1rem; | ||
padding-right: 1rem; | ||
position: absolute; | ||
background-color: #BEDDBA; | ||
display: inline-block; | ||
left: calc(36.8rem + 2px); | ||
bottom: 0; | ||
top: 0; | ||
color: black; | ||
font-weight: bold; | ||
font-size: 16px; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
width: 8rem; | ||
text-align: center; | ||
} | ||
|
||
p.findings-status-summary-entry a { | ||
text-decoration: none; | ||
color: black; | ||
font-weight: bold; | ||
font-size: 16px; | ||
} | ||
|
||
p.findings-status-summary-title-entry { | ||
color: black; | ||
padding: .5rem; | ||
padding-left: 1rem; | ||
padding-right: 1rem; | ||
margin: 0 10rem 2px calc(2rem + 4px); | ||
position: relative; | ||
text-decoration: none; | ||
color: black; | ||
font-weight: bold; | ||
font-size: 16px; | ||
} | ||
|
||
p.findings-status-summary-title-entry::after { | ||
content: 'Status'; | ||
padding: .5rem; | ||
padding-left: 1rem; | ||
padding-right: 1rem; | ||
position: absolute; | ||
background-color: #ffffff; | ||
display: inline-block; | ||
left: calc(36.8rem + 2px); | ||
bottom: 0; | ||
top: 0; | ||
color: black; | ||
font-weight: bold; | ||
font-size: 16px; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
width: 8rem; | ||
text-align: center; | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
writehat/templates/componentTemplates/FindingsStatusList.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<section class="l{{ level }} component {% if pageBreakBefore %} page-break{% endif %}"> | ||
{% include 'componentTemplates/Heading.html' with name=name %} | ||
|
||
{% for fgroup in report.ordered_fgroups %} | ||
|
||
<!-- Only include the title if there are findings --> | ||
{% if fgroup.findings %} | ||
<div class='finding-group-name'> | ||
{{ fgroup.name }} | ||
</div> | ||
<p class="findings-status-summary-title-entry" finding-status-title="Status"> | ||
Finding | ||
</p> | ||
{% for finding in fgroup %} | ||
{% if not report.finding_uuids or finding.id in report.finding_uuids %} | ||
<p class="findings-status-summary-entry" finding-status="{{ finding.status }}"> | ||
<a href="#finding-{{ finding.id }}">[{{ finding.number }}] {{ finding.name }}</a> | ||
</p> | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% endif %} | ||
{% endfor %} | ||
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component should additionally be able to filter by finding group, like what we do in FindingsList.py. That way we dont always have to show the status of every finding group all the time.