Skip to content

Commit

Permalink
Consistent usage of nominative in credential messages, fixing exposed…
Browse files Browse the repository at this point in the history
…vcs with credentials template (#633)
  • Loading branch information
kazet authored Nov 13, 2023
1 parent cf59784 commit 7d14097
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion artemis/reporting/base/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Report:
report_type: ReportType

# Additional report data - the content depends on the report type
additional_data: Dict[str, Any]
additional_data: Dict[str, Any] = field(default_factory=dict)
timestamp: Optional[datetime.datetime] = None

# === All following variables are provided automatically, you don't have to provide them when creating a Report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ msgstr ""

#: artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2:6
msgid "the following credentials allow login"
msgstr "można do niej zalogować się"
msgstr "następujące dane umożliwiają logowanie"

#: artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2:10
msgid "username"
msgstr "nazwą użytkownika"
msgstr "nazwa użytkownika"

#: artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2:11
msgid "and"
msgstr "i"

#: artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2:12
msgid "password"
msgstr "hasłem"
msgstr "hasło"

#: artemis/reporting/modules/mysql_bruter/template_exposed_database_with_easy_password.jinja2:14
msgid "empty password"
msgstr "pustym hasłem"
msgstr "puste hasło"
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ msgstr ""

#: artemis/reporting/modules/ssh_bruter/template_exposed_ssh_with_easy_password.jinja2:6
msgid "the following credentials allow logging in"
msgstr "można zalogować się poniższymi danymi"
msgstr "następujące dane umożliwiają logowanie"

#: artemis/reporting/modules/ssh_bruter/template_exposed_ssh_with_easy_password.jinja2:10
msgid "username:"
msgstr "nazwą użytkownika:"
msgstr "nazwa użytkownika:"

#: artemis/reporting/modules/ssh_bruter/template_exposed_ssh_with_easy_password.jinja2:11
msgid "and"
msgstr "i"

#: artemis/reporting/modules/ssh_bruter/template_exposed_ssh_with_easy_password.jinja2:12
msgid "password:"
msgstr "hasłem:"
msgstr "hasło:"

#: artemis/reporting/modules/ssh_bruter/template_exposed_ssh_with_easy_password.jinja2:13
msgid "empty password"
msgstr "pustym hasłem"
msgstr "puste hasło"
4 changes: 0 additions & 4 deletions artemis/reporting/modules/vcs/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def _create_reports_svn(task_result: Dict[str, Any], language: Language) -> List
target=db_url,
report_type=VCSReporter.EXPOSED_VERSION_CONTROL_FOLDER_WITH_CREDENTIALS,
additional_data={
"config_url": db_url,
"username": parsed_remote_url.username,
"password_prefix": parsed_remote_url.password[:3],
},
Expand Down Expand Up @@ -100,7 +99,6 @@ def _create_reports_svn(task_result: Dict[str, Any], language: Language) -> List
top_level_target=get_top_level_target(task_result),
target=db_url,
report_type=VCSReporter.EXPOSED_VERSION_CONTROL_FOLDER,
additional_data={"config_url": db_url},
timestamp=task_result["created_at"],
)
]
Expand Down Expand Up @@ -151,7 +149,6 @@ def _create_reports_git(task_result: Dict[str, Any], language: Language) -> List
target=config_url,
report_type=VCSReporter.EXPOSED_VERSION_CONTROL_FOLDER_WITH_CREDENTIALS,
additional_data={
"config_url": repo_url,
"username": parsed_remote_url.username,
"password_prefix": parsed_remote_url.password[:3],
},
Expand All @@ -163,7 +160,6 @@ def _create_reports_git(task_result: Dict[str, Any], language: Language) -> List
top_level_target=get_top_level_target(task_result),
target=config_url,
report_type=VCSReporter.EXPOSED_VERSION_CONTROL_FOLDER,
additional_data={"config_url": config_url},
timestamp=task_result["created_at"],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% for report in data.reports %}
{% if report.report_type == "exposed_version_control_folder_with_credentials" %}
<li>
{{ report.additional_data.config_url }} ({{ _("username") }}: {{ report.additional_data.username }}, {{ _("password") }}: {{ report.additional_data.password_prefix }}...)
{{ report.target }} ({{ _("username") }}: {{ report.additional_data.username }}, {{ _("password") }}: {{ report.additional_data.password_prefix }}...)
{{ report_meta(report) }}
</li>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ msgstr ""

#: artemis/reporting/modules/wordpress_bruter/template_exposed_wordpress_with_easy_password.jinja2:6
msgid "the following credentials allow login"
msgstr "można się do nich zalogować następującymi danymi"
msgstr "następujące dane umożliwiają logowanie"

#: artemis/reporting/modules/wordpress_bruter/template_exposed_wordpress_with_easy_password.jinja2:10
msgid "username"
msgstr "nazwą użytkownika"
msgstr "nazwa użytkownika"

#: artemis/reporting/modules/wordpress_bruter/template_exposed_wordpress_with_easy_password.jinja2:11
msgid "and"
msgstr "oraz"

#: artemis/reporting/modules/wordpress_bruter/template_exposed_wordpress_with_easy_password.jinja2:12
msgid "password"
msgstr "hasłem"
msgstr "hasło"

#: artemis/reporting/modules/wordpress_bruter/template_exposed_wordpress_with_easy_password.jinja2:14
msgid "empty password"
msgstr "pustym hasłem"
msgstr "puste hasło"

0 comments on commit 7d14097

Please sign in to comment.