local-triage 0.0.0-stage → 0.10.0-dev.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +90 -2
- package/THIRD-PARTY-NOTICES.md +48 -0
- package/app/__init__.py +3 -0
- package/app/affiliation.py +137 -0
- package/app/ask.py +300 -0
- package/app/build_info.py +98 -0
- package/app/capec.py +168 -0
- package/app/capec_view.py +27 -0
- package/app/codecmp.py +59 -0
- package/app/config.py +411 -0
- package/app/context.py +1451 -0
- package/app/cvss.py +357 -0
- package/app/db.py +6234 -0
- package/app/defect.py +670 -0
- package/app/defect_check.py +323 -0
- package/app/defect_drafts.py +612 -0
- package/app/defect_dto.py +149 -0
- package/app/defect_fields.py +248 -0
- package/app/defect_form.py +124 -0
- package/app/defect_links.py +107 -0
- package/app/defect_local_text.py +103 -0
- package/app/defect_references.py +164 -0
- package/app/defect_where.py +147 -0
- package/app/ecosystem.py +51 -0
- package/app/executors.py +660 -0
- package/app/feeds.py +1231 -0
- package/app/guard.py +164 -0
- package/app/hub_block_builder.py +200 -0
- package/app/hub_block_version.py +220 -0
- package/app/hub_defects.py +4469 -0
- package/app/hub_effects.py +421 -0
- package/app/hub_entity_versions.py +108 -0
- package/app/hub_import.py +2054 -0
- package/app/hub_onboarding.py +114 -0
- package/app/hub_ops.py +330 -0
- package/app/hub_pull.py +1195 -0
- package/app/hub_state.py +255 -0
- package/app/hub_status.py +237 -0
- package/app/hub_sync.py +619 -0
- package/app/hub_sync_api.py +241 -0
- package/app/hub_sync_compare.py +1054 -0
- package/app/hub_sync_contract.py +75 -0
- package/app/hub_template_model.py +74 -0
- package/app/hub_text_scale.py +159 -0
- package/app/journal.py +250 -0
- package/app/llm.py +850 -0
- package/app/llm_chat.py +596 -0
- package/app/llm_http.py +319 -0
- package/app/llm_messages.py +401 -0
- package/app/llm_net.py +764 -0
- package/app/llm_ollama.py +571 -0
- package/app/lockfile.py +505 -0
- package/app/logsafe.py +54 -0
- package/app/main.py +367 -0
- package/app/mask_display.py +132 -0
- package/app/masking.py +814 -0
- package/app/metrics.py +194 -0
- package/app/model_traffic.py +519 -0
- package/app/models.py +483 -0
- package/app/navigation.py +121 -0
- package/app/osv.py +279 -0
- package/app/package_identity.py +189 -0
- package/app/package_transition.py +824 -0
- package/app/profile_gate.py +71 -0
- package/app/prompts.py +1108 -0
- package/app/provider_keys.py +189 -0
- package/app/providers.py +511 -0
- package/app/routes/__init__.py +10 -0
- package/app/routes/api.py +153 -0
- package/app/routes/capec.py +186 -0
- package/app/routes/common.py +407 -0
- package/app/routes/components.py +1499 -0
- package/app/routes/cwe.py +168 -0
- package/app/routes/decision_selected.py +153 -0
- package/app/routes/defect_add.py +223 -0
- package/app/routes/defect_card_routes.py +363 -0
- package/app/routes/defect_selected.py +342 -0
- package/app/routes/feeds.py +155 -0
- package/app/routes/findings.py +2736 -0
- package/app/routes/hub.py +402 -0
- package/app/routes/hub_bulk.py +288 -0
- package/app/routes/hub_defect_routes.py +1945 -0
- package/app/routes/hub_status_routes.py +1132 -0
- package/app/routes/hub_sync_routes.py +463 -0
- package/app/routes/journal.py +132 -0
- package/app/routes/projects.py +1601 -0
- package/app/routes/providers.py +336 -0
- package/app/routes/references.py +26 -0
- package/app/routes/runs.py +219 -0
- package/app/routes/sca.py +2722 -0
- package/app/routes/settings.py +163 -0
- package/app/run_errors.py +151 -0
- package/app/sca.py +1662 -0
- package/app/sca_contract.py +1289 -0
- package/app/sca_research.py +1089 -0
- package/app/sca_research_net.py +1007 -0
- package/app/sca_text.py +965 -0
- package/app/serve.py +70 -0
- package/app/settings_store.py +262 -0
- package/app/static/app.css +2802 -0
- package/app/static/app.js +3772 -0
- package/app/static/capec-license.txt +9 -0
- package/app/static/favicon.svg +1 -0
- package/app/static/fonts/Golos-Text_DemiBold.woff2 +0 -0
- package/app/static/fonts/Golos-Text_Regular.woff2 +0 -0
- package/app/static/fonts/OFL.txt +90 -0
- package/app/static/navigation.js +234 -0
- package/app/static/observability.js +121 -0
- package/app/static/theme.js +49 -0
- package/app/storage/__init__.py +16 -0
- package/app/storage/local_state.py +246 -0
- package/app/storage/migrate.py +110 -0
- package/app/storage/migrations/postgresql/0001_baseline.sql +896 -0
- package/app/storage/migrations/postgresql/0002_feeds_and_secrets.sql +55 -0
- package/app/storage/migrations/postgresql/0003_project_mask_display.sql +5 -0
- package/app/storage/migrations/postgresql/0004_package_identity.sql +36 -0
- package/app/storage/postgresql.py +573 -0
- package/app/storage/schema.py +619 -0
- package/app/storage/sql.py +57 -0
- package/app/storage/tools.py +254 -0
- package/app/telemetry.py +307 -0
- package/app/templates/base.html +91 -0
- package/app/templates/capec/context.html +3 -0
- package/app/templates/capec/detail.html +27 -0
- package/app/templates/capec/index.html +128 -0
- package/app/templates/components/_archive.html +11 -0
- package/app/templates/components/archived.html +19 -0
- package/app/templates/components/batch.html +35 -0
- package/app/templates/components/detail.html +332 -0
- package/app/templates/components/index.html +338 -0
- package/app/templates/components/research_preview.html +80 -0
- package/app/templates/components/research_run.html +54 -0
- package/app/templates/cwe/bdu.html +56 -0
- package/app/templates/cwe/detail.html +233 -0
- package/app/templates/cwe/index.html +97 -0
- package/app/templates/error.html +8 -0
- package/app/templates/feeds/index.html +65 -0
- package/app/templates/findings/card.html +639 -0
- package/app/templates/findings/decision_selected.html +41 -0
- package/app/templates/findings/defect_add.html +46 -0
- package/app/templates/findings/defect_selected.html +47 -0
- package/app/templates/findings/list.html +153 -0
- package/app/templates/findings/send_selected.html +53 -0
- package/app/templates/findings/trace.html +72 -0
- package/app/templates/journal/detail.html +19 -0
- package/app/templates/journal/index.html +19 -0
- package/app/templates/macros.html +440 -0
- package/app/templates/navigation-fields.html +1 -0
- package/app/templates/navigation.html +11 -0
- package/app/templates/projects/_identity_summary.html +42 -0
- package/app/templates/projects/defect_card.html +153 -0
- package/app/templates/projects/defect_create_preview.html +17 -0
- package/app/templates/projects/defect_fields_diff.html +6 -0
- package/app/templates/projects/defect_fields_form.html +40 -0
- package/app/templates/projects/defect_references.html +17 -0
- package/app/templates/projects/defect_sync_preview.html +28 -0
- package/app/templates/projects/defect_update_actions.html +6 -0
- package/app/templates/projects/defect_update_preview.html +24 -0
- package/app/templates/projects/defects.html +126 -0
- package/app/templates/projects/delete.html +31 -0
- package/app/templates/projects/external.html +61 -0
- package/app/templates/projects/folders.html +64 -0
- package/app/templates/projects/hub_accepted.html +10 -0
- package/app/templates/projects/hub_assignment.html +50 -0
- package/app/templates/projects/hub_pending.html +20 -0
- package/app/templates/projects/hub_pending_list.html +17 -0
- package/app/templates/projects/hub_state_note.html +23 -0
- package/app/templates/projects/hub_step_note.html +5 -0
- package/app/templates/projects/hub_sync.html +105 -0
- package/app/templates/projects/hub_sync_confirm.html +32 -0
- package/app/templates/projects/hub_sync_worker.html +5 -0
- package/app/templates/projects/hub_text_rules.html +64 -0
- package/app/templates/projects/identity_report.html +74 -0
- package/app/templates/projects/list.html +90 -0
- package/app/templates/projects/project.html +433 -0
- package/app/templates/reference-missing.html +14 -0
- package/app/templates/runs/run.html +166 -0
- package/app/templates/sca/card.html +476 -0
- package/app/templates/sca/index.html +321 -0
- package/app/templates/settings/hub_url.html +31 -0
- package/app/templates/settings/index.html +216 -0
- package/app/templates/settings/provider.html +229 -0
- package/app/templates/settings/providers.html +37 -0
- package/app/templates/worklists.html +52 -0
- package/app/textsafe.py +117 -0
- package/app/timing.py +245 -0
- package/app/triage.py +1743 -0
- package/app/view.py +430 -0
- package/app/worklists.py +204 -0
- package/examples/demo/demo-hub-report-v2.xlsx +0 -0
- package/examples/demo/demo-hub-report.xlsx +0 -0
- package/examples/demo/repos/billing-core/pom.xml +30 -0
- package/examples/demo/repos/billing-core/src/main/java/org/example/billing/Invoice.java +9 -0
- package/examples/demo/repos/billing-core/src/main/java/org/example/billing/InvoiceRepository.java +51 -0
- package/examples/demo/repos/billing-core/src/main/java/org/example/billing/InvoiceStatus.java +11 -0
- package/examples/demo/repos/billing-core/src/main/java/org/example/billing/config/DatabaseSettings.java +18 -0
- package/examples/demo/repos/billing-core/src/main/java/org/example/billing/payment/PaymentTokenService.java +35 -0
- package/examples/demo/repos/billing-core/src/main/java/org/example/billing/web/InvoiceExportController.java +57 -0
- package/examples/demo/repos/catalog-api/catalog_api/__init__.py +1 -0
- package/examples/demo/repos/catalog-api/catalog_api/products.py +24 -0
- package/examples/demo/repos/catalog-api/catalog_api/tasks.py +24 -0
- package/examples/demo/repos/catalog-api/catalog_api/views.py +17 -0
- package/examples/demo/repos/catalog-api/requirements.txt +3 -0
- package/npm/build.json +5 -0
- package/npm/cli.js +346 -0
- package/npm/files.manifest +224 -0
- package/npm/lib/binding.js +64 -0
- package/npm/lib/cluster.js +330 -0
- package/npm/lib/env.js +88 -0
- package/npm/lib/fsx.js +125 -0
- package/npm/lib/http.js +53 -0
- package/npm/lib/metrics.js +73 -0
- package/npm/lib/paths.js +150 -0
- package/npm/lib/pg.js +351 -0
- package/npm/lib/proc.js +101 -0
- package/npm/lib/python.js +133 -0
- package/npm/lib/stand.js +46 -0
- package/npm/lib/supervisor.js +1141 -0
- package/npm/lib/version.js +21 -0
- package/npm/requirements.txt +476 -0
- package/npm-shrinkwrap.json +111 -0
- package/package.json +37 -4
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
{% from "macros.html" import icon, project_tabs %}
|
|
3
|
+
{% block title %}Отчёт перехода идентичности · {{ project.name }} · Локальный триаж{% endblock %}
|
|
4
|
+
{% block page %}identity-report{% endblock %}
|
|
5
|
+
{% block crumbs %}<a href="/">Проекты</a><span aria-hidden="true"> / </span><a class="crumb-project" href="/projects/{{ project.id }}">{{ project.name }}</a><span aria-hidden="true"> / </span><span aria-current="page">Отчёт перехода</span>{% endblock %}
|
|
6
|
+
{% block subnav %}{{ project_tabs(project, counts.total, stats.sca, "components", counts.defects) }}{% endblock %}
|
|
7
|
+
{% block content %}
|
|
8
|
+
<div class="page-head">
|
|
9
|
+
<div>
|
|
10
|
+
<h1>Отчёт перехода идентичности пакетов</h1>
|
|
11
|
+
<p class="page-sub">Экосистема и координаты компонентов SCA – по сведениям Hub о библиотеке. Страница только показывает: в Hub она не обращается.</p>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="page-actions"><a class="btn btn-ghost" href="/projects/{{ project.id }}/components">{{ icon("arrow-left") }}К компонентам</a></div>
|
|
14
|
+
</div>
|
|
15
|
+
<section class="panel" id="identity-report-findings" aria-labelledby="identity-report-findings-title">
|
|
16
|
+
<h2 id="identity-report-findings-title">Находки SCA</h2>
|
|
17
|
+
<dl class="terms">
|
|
18
|
+
<dt>Всего</dt><dd>{{ report.findings }}</dd>
|
|
19
|
+
<dt>Идентичность по сведениям Hub</dt><dd>{{ report.by_source.get("hub", 0) }}</dd>
|
|
20
|
+
<dt>По выгрузке</dt><dd>{{ report.findings - report.by_source.get("hub", 0) }}</dd>
|
|
21
|
+
<dt>Переходов принято</dt><dd>{{ report.identity_rev }}</dd>
|
|
22
|
+
{% for label, n in report.marks %}<dt>{{ label }}</dt><dd>{{ n }}</dd>{% endfor %}
|
|
23
|
+
<dt>Мест в наборах выбрать заново</dt><dd>{{ report.pending_places }}</dd>
|
|
24
|
+
</dl>
|
|
25
|
+
</section>
|
|
26
|
+
<section class="panel" id="identity-report-groups" aria-labelledby="identity-report-groups-title">
|
|
27
|
+
<h2 id="identity-report-groups-title">Группы компонентов</h2>
|
|
28
|
+
<p>Перенесено групп: {{ report.moved|length }}. Расщеплено или слито: {{ report.not_moved|length }}.</p>
|
|
29
|
+
{% if report.moved or report.not_moved %}
|
|
30
|
+
<div class="table-wrap"><table class="table" id="identity-report-group-table">
|
|
31
|
+
<thead><tr><th scope="col">Было</th><th scope="col">Стало</th><th scope="col">Когда</th><th scope="col">Причина</th></tr></thead>
|
|
32
|
+
<tbody>{% for g in (report.moved + report.not_moved)[:200] %}<tr>
|
|
33
|
+
<td class="mono break">{{ g.triple|join(" ") }}</td>
|
|
34
|
+
<td>{% if g.to_ref %}<a class="mono" href="/projects/{{ project.id }}/components/{{ g.to_ref }}">новая карточка</a>{% elif g.has_archive %}<a class="mono" href="/projects/{{ project.id }}/components/{{ g.from_ref }}">архив</a>{% else %}расщеплена или слита{% endif %}</td>
|
|
35
|
+
<td><time datetime="{{ g.archived_at }}">{{ g.archived_at|ts }}</time></td>
|
|
36
|
+
<td>{{ g.reason }}</td>
|
|
37
|
+
</tr>{% endfor %}</tbody>
|
|
38
|
+
</table></div>
|
|
39
|
+
{% if (report.moved + report.not_moved)|length > 200 %}<p class="hint">Показаны первые 200 групп.</p>{% endif %}
|
|
40
|
+
{% endif %}
|
|
41
|
+
</section>
|
|
42
|
+
<section class="panel" id="identity-report-accepts" aria-labelledby="identity-report-accepts-title">
|
|
43
|
+
<h2 id="identity-report-accepts-title">Принятия с переходом</h2>
|
|
44
|
+
<p class="hint">Итог каждого «Принять состояние Hub», который менял идентичность пакетов, – как в блоке «Идентичность пакетов» при принятии (последние 20). Разделы выше – текущее состояние проекта.</p>
|
|
45
|
+
{% if report.accepts %}
|
|
46
|
+
<div class="table-wrap"><table class="table" id="identity-report-accepts-table">
|
|
47
|
+
<thead><tr><th scope="col">Когда</th><th scope="col">Находок с другим пакетом</th><th scope="col">Групп (перенос / расщепление / частично / слияние)</th><th scope="col">Снято «Проверено»</th><th scope="col">Подпись переписана</th><th scope="col">По другой версии</th><th scope="col">Согласий без ответа</th><th scope="col">Дефектов без единственного набора</th></tr></thead>
|
|
48
|
+
<tbody>{% for a in report.accepts %}{% set i = a.identity %}{% set kinds = (i.groups or [])|map(attribute="kind")|list %}<tr>
|
|
49
|
+
<td><time datetime="{{ a.applied_at }}">{{ a.applied_at|ts }}</time></td>
|
|
50
|
+
<td>{{ i.findings or 0 }} (уточнение – {{ i.refine or 0 }}, изменение – {{ i.change or 0 }})</td>
|
|
51
|
+
<td>{{ kinds|select("equalto", "перенос")|list|length }} / {{ kinds|select("equalto", "расщепление")|list|length }} / {{ kinds|select("equalto", "частичное расщепление")|list|length }} / {{ kinds|select("equalto", "слияние")|list|length }}</td>
|
|
52
|
+
<td>{{ (i.decisions or {}).reviewed_removed or 0 }}</td><td>{{ (i.decisions or {}).sig_rewritten or 0 }}</td>
|
|
53
|
+
<td>{{ (i.decisions or {}).other_version or 0 }}</td><td>{{ (i.decisions or {}).agree_stale or 0 }}</td>
|
|
54
|
+
<td>{{ (i.defects or {}).without_set_key_total or 0 }}</td>
|
|
55
|
+
</tr>{% endfor %}</tbody>
|
|
56
|
+
</table></div>
|
|
57
|
+
{% else %}<p>Принятий с переходом ещё не было.</p>{% endif %}
|
|
58
|
+
</section>
|
|
59
|
+
<section class="panel" id="identity-report-archive" aria-labelledby="identity-report-archive-title">
|
|
60
|
+
<h2 id="identity-report-archive-title">Снято в архив</h2>
|
|
61
|
+
{% if report.archived %}
|
|
62
|
+
<div class="table-wrap"><table class="table" id="identity-report-archive-table">
|
|
63
|
+
<thead><tr><th scope="col">Что</th><th scope="col">Строк</th><th scope="col">Последнее снятие</th></tr></thead>
|
|
64
|
+
<tbody>{% for a in report.archived %}<tr><td>{{ table_labels.get(a.source_table, a.source_table) }}</td><td>{{ a.n }}</td><td><time datetime="{{ a.last }}">{{ a.last|ts }}</time></td></tr>{% endfor %}</tbody>
|
|
65
|
+
</table></div>
|
|
66
|
+
{% else %}<p>Ничего не снято.</p>{% endif %}
|
|
67
|
+
</section>
|
|
68
|
+
<section class="panel" id="identity-report-defects" aria-labelledby="identity-report-defects-title">
|
|
69
|
+
<h2 id="identity-report-defects-title">Дефекты SCA без единственного набора</h2>
|
|
70
|
+
{% if report.defects %}
|
|
71
|
+
<ul class="item-list">{% for d in report.defects %}<li><a href="/projects/{{ project.id }}/defects/{{ d.id }}">ID{{ d.number if d.number is not none else "–" }}</a>{% for c in d.conflicts %} · <span class="small">{{ c }}</span>{% endfor %}</li>{% endfor %}</ul>
|
|
72
|
+
{% else %}<p>Нет.</p>{% endif %}
|
|
73
|
+
</section>
|
|
74
|
+
{% endblock %}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
{% from "macros.html" import icon, progress, tabs, empty_state %}
|
|
3
|
+
{% block title %}{% if archived %}Архив · {% endif %}Проекты · Локальный триаж{% endblock %}
|
|
4
|
+
{% block page %}projects{% endblock %}
|
|
5
|
+
{% block crumbs %}{% if archived %}<a href="/">Проекты</a><span aria-hidden="true"> / </span><span aria-current="page">Архив</span>{% endif %}{% endblock %}
|
|
6
|
+
{% block content %}
|
|
7
|
+
<div class="page-head">
|
|
8
|
+
<div>
|
|
9
|
+
<h1>{% if archived %}Архив проектов{% else %}Проекты{% endif %}</h1>
|
|
10
|
+
<p class="page-sub">{% if archived %}Решения и отметки архивных проектов сохранены: проект можно вернуть в любой момент.{% else %}Проект – выгрузка AppSec.Hub и папка с клонами её кодовых баз. Всё сохраняется: можно уйти и вернуться к той находке, где остановились.{% endif %}</p>
|
|
11
|
+
</div>
|
|
12
|
+
{% if not archived and projects %}
|
|
13
|
+
<div class="page-actions"><a class="btn" href="#new-project">{{ icon("plus") }}Новый проект</a></div>
|
|
14
|
+
{% endif %}
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
{{ tabs([("active", "Действующие", "/", active_count), ("archive", "Архив", "/projects/archive", archive_count)], "archive" if archived else "active", label="Проекты") }}
|
|
18
|
+
|
|
19
|
+
{% if projects %}
|
|
20
|
+
<section class="panel" aria-label="{% if archived %}Проекты в архиве{% else %}Действующие проекты{% endif %}">
|
|
21
|
+
<ul class="item-list project-list" data-rows>
|
|
22
|
+
{% for p in projects %}
|
|
23
|
+
<li class="item" id="project-{{ p.id }}">
|
|
24
|
+
<div class="item-main stack">
|
|
25
|
+
<div>
|
|
26
|
+
<div class="item-title"><a class="project-name" href="/projects/{{ p.id }}">{{ p.name }}</a></div>
|
|
27
|
+
<div class="item-meta dot-list">
|
|
28
|
+
<span>модель <span class="mono">{{ p.model or settings.default_model }}</span>{% if not p.model %} – из настроек{% endif %}</span>
|
|
29
|
+
{% if p.last_activity %}<span>активность <time datetime="{{ p.last_activity }}" data-relative>{{ p.last_activity|ts }}</time></span>{% endif %}
|
|
30
|
+
{% if p.missing %}<span>нет в новой выгрузке: {{ p.missing }}</span>{% endif %}
|
|
31
|
+
{% if archived and p.archived_at %}<span>в архиве с <time datetime="{{ p.archived_at }}">{{ p.archived_at|ts }}</time></span>{% endif %}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
{% if p.total %}
|
|
35
|
+
<div class="project-progress">
|
|
36
|
+
{{ progress(p.done, p.total, p.entered_total) }}
|
|
37
|
+
<div class="item-meta">{% if p.sast %}SAST {{ p.reviewed }} из {{ p.sast }}{% endif %}{% if p.sast and p.sca %} · {% endif %}{% if p.sca %}SCA {{ p.sca_reviewed }} из {{ p.sca }}{% endif %}</div>
|
|
38
|
+
</div>
|
|
39
|
+
{% elif p.action == "upload" %}
|
|
40
|
+
<div class="item-meta">Выгрузка не загружена.</div>
|
|
41
|
+
{% else %}
|
|
42
|
+
<div class="item-meta">Находок SAST и SCA в выгрузке нет.</div>
|
|
43
|
+
{% endif %}
|
|
44
|
+
</div>
|
|
45
|
+
<div class="item-aside">
|
|
46
|
+
{% if archived %}
|
|
47
|
+
<form method="post" action="/projects/{{ p.id }}/archive"><input type="hidden" name="action" value="restore"><button class="btn btn-small" type="submit">{{ icon("refresh") }}Вернуть</button></form>
|
|
48
|
+
{% else %}
|
|
49
|
+
{% if p.action == "continue" %}<a class="btn btn-small btn-primary" href="/projects/{{ p.id }}/continue">{{ icon("play") }}Продолжить</a>
|
|
50
|
+
{% elif p.action == "upload" %}<a class="btn btn-small" href="/projects/{{ p.id }}#step1">{{ icon("upload") }}Загрузить выгрузку</a>
|
|
51
|
+
{% else %}<a class="btn btn-small" href="/projects/{{ p.id }}">Открыть</a>{% endif %}
|
|
52
|
+
<form method="post" action="/projects/{{ p.id }}/archive"><input type="hidden" name="action" value="archive"><button class="btn btn-small btn-ghost" type="submit" data-confirm="Убрать проект «{{ p.name }}» в архив? Решения и отметки сохранятся, вернуть проект можно из раздела «Архив».">{{ icon("archive") }}В архив</button></form>
|
|
53
|
+
{% endif %}
|
|
54
|
+
<a class="btn btn-small btn-ghost btn-danger" href="/projects/{{ p.id }}/delete">{{ icon("trash") }}Удалить…</a>
|
|
55
|
+
</div>
|
|
56
|
+
</li>
|
|
57
|
+
{% endfor %}
|
|
58
|
+
</ul>
|
|
59
|
+
</section>
|
|
60
|
+
{% elif archived %}
|
|
61
|
+
{{ empty_state("В архиве пусто", "Проект убирается сюда кнопкой «В архив» в списке проектов: решения и отметки сохраняются, вернуть его можно в любой момент.", icon_name="archive") }}
|
|
62
|
+
{% else %}
|
|
63
|
+
{% call empty_state("Проектов пока нет", "Создайте проект, загрузите в него выгрузку из AppSec.Hub и выберите папку с клонами – дальше модель разберёт находки SAST, а вы проверите её вердикты. Можно начать с демо на выдуманных данных.", icon_name="inbox") %}
|
|
64
|
+
<form method="post" action="/projects/demo"><button type="submit" class="btn" id="create-demo" data-busy="Создаю демо-проект…">{{ icon("play") }}Создать демо-проект</button></form>
|
|
65
|
+
<a class="btn" href="#new-project">{{ icon("plus") }}Новый проект</a>
|
|
66
|
+
{% endcall %}
|
|
67
|
+
{% endif %}
|
|
68
|
+
|
|
69
|
+
{% if not archived %}
|
|
70
|
+
<section class="panel" id="new-project" aria-labelledby="new-title">
|
|
71
|
+
<h2 id="new-title">Новый проект</h2>
|
|
72
|
+
<form method="post" action="/projects" class="inline-form">
|
|
73
|
+
<label class="field grow">
|
|
74
|
+
<span class="field-label">Название</span>
|
|
75
|
+
<input type="text" name="name" maxlength="200" required placeholder="Например, Demo Library – октябрь" autocomplete="off">
|
|
76
|
+
</label>
|
|
77
|
+
<input type="hidden" name="mask_form" value="1">
|
|
78
|
+
<label class="check" title="Снято – в карточках находок видны настоящий код, строка выгрузки и поля без масок, чтобы проверить, например, жёстко заданные пароли. Модели код уходит с масками всегда. Менять можно в любой момент: решения и отметки «Проверено» не меняются."><input type="checkbox" name="mask_secrets" value="1" id="new-project-mask" checked> Маскировать секреты при показе</label>
|
|
79
|
+
<button type="submit" class="btn{% if not projects %} btn-primary{% endif %}">Создать</button>
|
|
80
|
+
</form>
|
|
81
|
+
<p class="field-hint">Выгрузку, папку с репозиториями и модель проекта укажете на его странице.</p>
|
|
82
|
+
{% if projects %}
|
|
83
|
+
<form method="post" action="/projects/demo" class="cluster demo-form">
|
|
84
|
+
<button type="submit" class="btn btn-small" id="create-demo" data-busy="Создаю демо-проект…">{{ icon("play") }}Создать демо-проект</button>
|
|
85
|
+
<span class="hint">выдуманная система Demo Library: две кодовые базы, находки SAST и SCA</span>
|
|
86
|
+
</form>
|
|
87
|
+
{% endif %}
|
|
88
|
+
</section>
|
|
89
|
+
{% endif %}
|
|
90
|
+
{% endblock %}
|