Skip to content
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

Hotfix/discover #373

Merged
merged 3 commits into from
Sep 23, 2021
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
4 changes: 1 addition & 3 deletions assemblyline/common/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ def __init__(self, classification_definition: Dict):
self.levels_aliases[a.upper()] = short_name
self.params_map[short_name] = {k: v for k, v in x.items() if k not in banned_params_keys}
self.params_map[name] = self.params_map[short_name]
self.levels_styles_map[short_name] = x.get('css', {'banner': 'alert-default',
'label': 'label-default',
'text': 'text-muted'})
self.levels_styles_map[short_name] = x.get('css', {'color': 'default'})
self.levels_styles_map[name] = self.levels_styles_map[short_name]
self.description[short_name] = x.get('description', "N/A")
self.description[name] = self.description[short_name]
Expand Down
16 changes: 4 additions & 12 deletions assemblyline/common/classification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ levels:
- U
# Stylesheet applied in the UI for the different levels
css:
# Top banner stylesheet (alert-* because it's based of bootstrap alert dialogs)
banner: alert-default
# Label stylesheet (label-* because it's based of bootstrap label components)
label: label-default
# Text stylesheet (text-* because it's based of bootstrap text color styles)
text: text-muted
# Name of the color scheme used for display (default, primary, secondary, success, info, warning, error)
color: default
# Description of the classification level
description: Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction.
# Interger value of the Classification level (higher is more classified)
Expand All @@ -34,9 +30,7 @@ levels:
short_name: TLP:W
- aliases: []
css:
banner: alert-success
label: label-success
text: text-success
color: success
description:
Recipients may share TLP:GREEN information with peers and partner organizations
within their sector or community, but not via publicly accessible channels. Information
Expand All @@ -48,9 +42,7 @@ levels:
- aliases:
- RESTRICTED
css:
banner: alert-warning2
label: label-warning
text: text-warning2
color: warning
description:
Recipients may only share TLP:AMBER information with members of their
own organization and with clients or customers who need to know the information
Expand Down
3 changes: 3 additions & 0 deletions assemblyline/odm/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,8 @@ class UI(odm.Model):
banner_level: str = odm.Enum(values=["info", "warning", "success", "error"])
# Turn on debugging
debug: bool = odm.Boolean()
# Discover URL
discover_url: str = odm.Optional(odm.Keyword())
# Which encoding will be used
download_encoding = odm.Enum(values=["raw", "cart"])
# Assemblyline admins email address
Expand Down Expand Up @@ -832,6 +834,7 @@ class UI(odm.Model):
"banner": None,
"banner_level": 'info',
"debug": False,
"discover_url": None,
"download_encoding": "cart",
"email": None,
"enforce_quota": True,
Expand Down