Skip to content

Commit 4f2bfba

Browse files
authored
Version 3.5.1: Add toggle deleted (#45)
1 parent 6810d29 commit 4f2bfba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+629
-362
lines changed

openapi.json

+98-19
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "Repository Scanner (RESC)",
55
"description": "RESC API helps you to perform several operations upon findings obtained from multiple source code repositories.",
6-
"version": "3.5.0"
6+
"version": "3.5.1"
77
},
88
"paths": {
99
"/resc/v1/health": {
@@ -1161,7 +1161,7 @@
11611161
"resc-findings"
11621162
],
11631163
"summary": "Get findings by rule",
1164-
"description": "Retrieve all findings objects paginated by rule\n\n- **db_connection**: Session of the database connection\n- **rule_name**: Name of the rule to filter the findings by\n- **skip**: Integer amount of records to skip to support pagination\n- **limit**: Integer amount of records to return, to support pagination\n- **return**: [FindingRead]\n The output will contain a PaginationModel containing the list of FindingRead type objects,\n or an empty list if no finding was found for the given rule",
1164+
"description": "Retrieve all findings objects paginated by rule\n\n- **db_connection**: Session of the database connection\n- **rule_name**: Name of the rule to filter the findings by\n- **skip**: Integer amount of records to skip to support pagination\n- **limit**: Integer amount of records to return, to support pagination\n- **include_deleted_repositories**: boolean flag to include deleted repositories\n- **return**: [FindingRead]\n The output will contain a PaginationModel containing the list of FindingRead type objects,\n or an empty list if no finding was found for the given rule",
11651165
"operationId": "get_findings_by_rule_resc_v1_findings_by_rule__rule_name__get",
11661166
"parameters": [
11671167
{
@@ -1208,8 +1208,8 @@
12081208
"type": "null"
12091209
}
12101210
],
1211-
"title": "IncludeDeletedRepositories",
1212-
"default": false
1211+
"default": false,
1212+
"title": "Include Deleted Repositories"
12131213
}
12141214
}
12151215
],
@@ -1515,7 +1515,7 @@
15151515
"resc-findings"
15161516
],
15171517
"summary": "Get all detailed findings",
1518-
"description": "Retrieve all findings objects paginated\n- **query_string**\n\n A query string with the following format:\n param1=value1&param2=value2&param3=value3\n\n Where the possible parameters are:\n\n - vcs_providers [enum] of type VCSProviders, possible values are: BITBUCKET, AZURE_DEVOPS.\n Will default to all if non-specified.\n\n - finding_statuses [enum of type FindingStatus], possible values are:NOT_ANALYZED,FALSE_POSITIVE,\n TRUE_POSITIVE. Will default to all if non-specified.\n\n - rule_pack_versions of type [String]\n\n - rule_names of type [String]\n\n - rule_tags of type [String] findings in the result will have at least one of the specified tags\n for the rules\n\n - project_name of type String\n\n - repository_names of type [String]\n\n - scan_ids of type list Integer\n\n - start_date_time of type datetime with the following format: 1970-01-31T00:00:00\n\n - end_date_time of type datetime with the following format: 1970-01-31T00:00:00\n\n- **db_connection**\n\n Session of the database connection\n\n- **skip**\n\n Integer amount of records to skip to support pagination\n\n- **limit**\n\n Integer amount of records to return, to support pagination\n\n- **return** [FindingRead]\n\n The output will contain a PaginationModel containing the list of DetailedFinding type objects,\n or an empty list if no finding was found",
1518+
"description": "Retrieve all findings objects paginated\n- **query_string**\n\n A query string with the following format:\n param1=value1&param2=value2&param3=value3\n\n Where the possible parameters are:\n\n - vcs_providers [enum] of type VCSProviders, possible values are: BITBUCKET, AZURE_DEVOPS.\n Will default to all if non-specified.\n\n - finding_statuses [enum of type FindingStatus], possible values are:NOT_ANALYZED,FALSE_POSITIVE,\n TRUE_POSITIVE. Will default to all if non-specified.\n\n - rule_pack_versions of type [String]\n\n - rule_names of type [String]\n\n - rule_tags of type [String] findings in the result will have at least one of the specified tags\n for the rules\n\n - project_name of type String\n\n - repository_names of type [String]\n\n - scan_ids of type list Integer\n\n - start_date_time of type datetime with the following format: 1970-01-31T00:00:00\n\n - end_date_time of type datetime with the following format: 1970-01-31T00:00:00\n\n - include_deleted_repositories of type boolean\n\n- **db_connection**\n\n Session of the database connection\n\n- **skip**\n\n Integer amount of records to skip to support pagination\n\n- **limit**\n\n Integer amount of records to return, to support pagination\n\n- **return** [FindingRead]\n\n The output will contain a PaginationModel containing the list of DetailedFinding type objects,\n or an empty list if no finding was found",
15191519
"operationId": "get_all_detailed_findings_resc_v1_detailed_findings_get",
15201520
"parameters": [
15211521
{
@@ -1679,7 +1679,7 @@
16791679
"items": {
16801680
"$ref": "#/components/schemas/VCSProviders"
16811681
},
1682-
"title": "VCSProviders"
1682+
"title": "Vcs Provider"
16831683
}
16841684
},
16851685
{
@@ -1731,8 +1731,8 @@
17311731
"type": "null"
17321732
}
17331733
],
1734-
"title": "IncludeDeletedRepositories",
1735-
"default": false
1734+
"default": false,
1735+
"title": "Include Deleted Repositories"
17361736
}
17371737
}
17381738
],
@@ -2011,7 +2011,7 @@
20112011
"items": {
20122012
"$ref": "#/components/schemas/VCSProviders"
20132013
},
2014-
"title": "VCSProviders"
2014+
"title": "Vcs Provider"
20152015
}
20162016
},
20172017
{
@@ -2055,8 +2055,8 @@
20552055
"type": "null"
20562056
}
20572057
],
2058-
"title": "IncludeDeletedRepositories",
2059-
"default": false
2058+
"default": false,
2059+
"title": "Include Deleted Repositories"
20602060
}
20612061
}
20622062
],
@@ -2100,7 +2100,7 @@
21002100
"resc-repositories"
21012101
],
21022102
"summary": "Get all unique repository names",
2103-
"description": "Retrieve all unique repository names\n\n- **db_connection**: Session of the database connection\n- **vcs_providers**: Optional, filter of supported vcs provider types\n- **project_name**: Optional, filter on project name. It is used as a full string match filter\n- **only_if_has_findings**: Optional, filter all repositories that have findings\n- **return**: List[str]\n The output will contain a list of unique repositories",
2103+
"description": "Retrieve all unique repository names\n\n- **db_connection**: Session of the database connection\n- **vcs_providers**: Optional, filter of supported vcs provider types\n- **project_name**: Optional, filter on project name. It is used as a full string match filter\n- **only_if_has_findings**: Optional, filter all repositories that have findings\n- **only_if_has_untriaged_findings**: Optional, filter repositories with untriaged findings\n- **return**: List[str]\n The output will contain a list of unique repositories",
21042104
"operationId": "get_distinct_repositories_resc_v1_repositories_distinct_repositories__get",
21052105
"parameters": [
21062106
{
@@ -2112,7 +2112,7 @@
21122112
"items": {
21132113
"$ref": "#/components/schemas/VCSProviders"
21142114
},
2115-
"title": "VCSProviders"
2115+
"title": "Vcs Provider"
21162116
}
21172117
},
21182118
{
@@ -2156,8 +2156,18 @@
21562156
"type": "null"
21572157
}
21582158
],
2159-
"title": "IncludeDeletedRepositories",
2160-
"default": false
2159+
"default": false,
2160+
"title": "Include Deleted Repositories"
2161+
}
2162+
},
2163+
{
2164+
"name": "only_if_has_untriaged_findings",
2165+
"in": "query",
2166+
"required": false,
2167+
"schema": {
2168+
"type": "boolean",
2169+
"default": false,
2170+
"title": "Only If Has Untriaged Findings"
21612171
}
21622172
}
21632173
],
@@ -2260,7 +2270,7 @@
22602270
"resc-repositories"
22612271
],
22622272
"summary": "Get all repositories with findings metadata",
2263-
"description": "Retrieve all repository objects paginated\n\n- **db_connection**: Session of the database connection\n- **skip**: Integer amount of records to skip to support pagination\n- **limit**: Integer amount of records to return, to support pagination\n- **vcs_providers**: Optional, filter on supported vcs provider types\n- **projectfilter**: Optional, filter on project name. It is used as a string contains filter\n- **repositoryfilter**: Optional, filter on repository name. It is used as a string contains filter\n- **only_if_has_findings**: Optional, filter all repositories those have findings\n- **return**: [RepositoryEnrichedRead]\n The output will contain a PaginationModel containing the list of RepositoryEnrichedRead type objects,\n or an empty list if no repository",
2273+
"description": "Retrieve all repository objects paginated\n\n- **db_connection**: Session of the database connection\n- **skip**: Integer amount of records to skip to support pagination\n- **limit**: Integer amount of records to return, to support pagination\n- **vcs_providers**: Optional, filter on supported vcs provider types\n- **projectfilter**: Optional, filter on project name. It is used as a string contains filter\n- **repositoryfilter**: Optional, filter on repository name. It is used as a string contains filter\n- **only_if_has_findings**: Optional, filter all repositories those have findings\n- **only_if_has_untriaged_findings**: Optional, filter repositories with untriaged findings\n- **return**: [RepositoryEnrichedRead]\n The output will contain a PaginationModel containing the list of RepositoryEnrichedRead type objects,\n or an empty list if no repository",
22642274
"operationId": "get_all_repositories_with_findings_metadata_resc_v1_repositories_findings_metadata__get",
22652275
"parameters": [
22662276
{
@@ -2294,7 +2304,7 @@
22942304
"items": {
22952305
"$ref": "#/components/schemas/VCSProviders"
22962306
},
2297-
"title": "VCSProviders"
2307+
"title": "Vcs Provider"
22982308
}
22992309
},
23002310
{
@@ -2356,8 +2366,18 @@
23562366
"type": "null"
23572367
}
23582368
],
2359-
"title": "IncludeDeletedRepositories",
2360-
"default": false
2369+
"default": false,
2370+
"title": "Include Deleted Repositories"
2371+
}
2372+
},
2373+
{
2374+
"name": "only_if_has_untriaged_findings",
2375+
"in": "query",
2376+
"required": false,
2377+
"schema": {
2378+
"type": "boolean",
2379+
"default": false,
2380+
"title": "Only If Has Untriaged Findings"
23612381
}
23622382
}
23632383
],
@@ -2514,6 +2534,65 @@
25142534
}
25152535
}
25162536
},
2537+
"/resc/v1/repositories/{repository_id}/toggle-deleted": {
2538+
"patch": {
2539+
"tags": [
2540+
"resc-repositories"
2541+
],
2542+
"summary": "Toggle the deleted_at for a repository",
2543+
"description": "Toggle the deleted_at for a repository\n\n Audit all associated findings as GONE (if not audited).\n\n- **db_connection**: Session of the database connection\n- **repository_id**: ID of the repository to toggle\n- **return**: The output will contain the updated metadata of the repository",
2544+
"operationId": "toggle_deleted_at_for_repository_resc_v1_repositories__repository_id__toggle_deleted_patch",
2545+
"parameters": [
2546+
{
2547+
"name": "repository_id",
2548+
"in": "path",
2549+
"required": true,
2550+
"schema": {
2551+
"type": "integer",
2552+
"title": "Repository Id"
2553+
}
2554+
}
2555+
],
2556+
"responses": {
2557+
"200": {
2558+
"description": "Toggle the deleted_at of repository <repository_id>",
2559+
"content": {
2560+
"application/json": {
2561+
"schema": {
2562+
"$ref": "#/components/schemas/RepositoryRead"
2563+
}
2564+
}
2565+
}
2566+
},
2567+
"404": {
2568+
"description": "Repository <repository_id> not found",
2569+
"content": {
2570+
"application/json": {
2571+
"schema": {
2572+
"$ref": "#/components/schemas/Model404"
2573+
}
2574+
}
2575+
}
2576+
},
2577+
"500": {
2578+
"description": "Internal server error. Contact your system administrator"
2579+
},
2580+
"503": {
2581+
"description": "Unable to communicate with DataBase, Please contact your system administrator"
2582+
},
2583+
"422": {
2584+
"description": "Validation Error",
2585+
"content": {
2586+
"application/json": {
2587+
"schema": {
2588+
"$ref": "#/components/schemas/HTTPValidationError"
2589+
}
2590+
}
2591+
}
2592+
}
2593+
}
2594+
}
2595+
},
25172596
"/resc/v1/scans": {
25182597
"get": {
25192598
"tags": [

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "resc-frontend",
3-
"version": "3.5.0",
3+
"version": "3.5.1",
44
"author": "ABN AMRO Bank",
55
"description": "Repository Scanner Frontend",
66
"license": "MIT",
@@ -48,7 +48,8 @@
4848
"vue-loader": "^17.3.1",
4949
"vue-multiselect": "^3.0.0-beta.3",
5050
"vue-router": "^4.2.5",
51-
"vue-sidebar-menu": "^5.2.12"
51+
"vue-sidebar-menu": "^5.2.12",
52+
"vue3-toastify": "^0.2.2"
5253
},
5354
"devDependencies": {
5455
"@pinia/testing": "^0.1.3",

src/components/Common/CardVue.vue

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<b-card class="card-box">
3+
<BCard class="card-box">
44
<template #header>
55
<div class="d-flex align-items-center justify-content-center fw-bold">
66
<p class="mb-0 me-2">{{ title }}</p>
@@ -11,9 +11,9 @@
1111
:style="titleIconStyle"
1212
:icon="titleIconDefinition"
1313
/>
14-
<b-tooltip :target="titleIconTooltipId" placement="right">
14+
<BTooltip :target="titleIconTooltipId" placement="right">
1515
{{ titleIconTooltip }}
16-
</b-tooltip>
16+
</BTooltip>
1717
</template>
1818
</div>
1919
</template>
@@ -31,12 +31,13 @@
3131
/>
3232
</div>
3333
</template>
34-
</b-card>
34+
</BCard>
3535
</div>
3636
</template>
3737
<script setup lang="ts">
3838
import { ref } from 'vue';
3939
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
40+
import { BCard, BTooltip } from 'bootstrap-vue-next';
4041
4142
export type CardIcon =
4243
| 'info-circle'
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<template>
22
<div>
3-
<b-badge v-if="props.status == 'NOT_ANALYZED'" variant="secondary">Not Analyzed</b-badge>
4-
<b-badge v-if="props.status == 'NOT_ACCESSIBLE'" class="badge bg-info">Not Accessible</b-badge>
5-
<b-badge v-if="props.status == 'CLARIFICATION_REQUIRED'" variant="warning"
6-
>Clarification Required</b-badge
3+
<BBadge v-if="props.status == 'NOT_ANALYZED'" variant="secondary">Not Analyzed</BBadge>
4+
<BBadge v-if="props.status == 'NOT_ACCESSIBLE'" class="badge bg-info">Not Accessible</BBadge>
5+
<BBadge v-if="props.status == 'CLARIFICATION_REQUIRED'" variant="warning"
6+
>Clarification Required</BBadge
77
>
8-
<b-badge v-if="props.status == 'TRUE_POSITIVE'" variant="danger">True Positive</b-badge>
9-
<b-badge v-if="props.status == 'FALSE_POSITIVE'" variant="success">False Positive</b-badge>
10-
<b-badge v-if="props.status == 'OUTDATED'" variant="dark">Outdated</b-badge>
8+
<BBadge v-if="props.status == 'TRUE_POSITIVE'" variant="danger">True Positive</BBadge>
9+
<BBadge v-if="props.status == 'FALSE_POSITIVE'" variant="success">False Positive</BBadge>
10+
<BBadge v-if="props.status == 'OUTDATED'" variant="dark">Outdated</BBadge>
1111
</div>
1212
</template>
1313
<script setup lang="ts">
1414
import type { FindingStatus } from '@/services/shema-to-types';
15+
import { BBadge } from 'bootstrap-vue-next';
1516
type Props = { status: FindingStatus };
1617
const props = defineProps<Props>();
1718
</script>

src/components/Common/HealthBar.vue

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div>
3-
<b-progress class="mt-2" :max="props.totalCount" height="0.8rem" show-value>
4-
<b-progress-bar
3+
<BProgress class="mt-2" :max="props.totalCount" height="0.8rem" show-value>
4+
<BProgressBar
55
v-b-popover.hover.bottom="getPopOverContent('True Positive', props.truePositive)"
66
:value="props.truePositive"
77
variant="danger"
@@ -11,8 +11,8 @@
1111
<strong>{{ showFindingsInPercentage(props.truePositive) }}</strong></small
1212
>
1313
</div>
14-
</b-progress-bar>
15-
<b-progress-bar
14+
</BProgressBar>
15+
<BProgressBar
1616
v-b-popover.hover.bottom="getPopOverContent('False Positive', props.falsePositive)"
1717
:value="props.falsePositive"
1818
variant="success"
@@ -22,8 +22,8 @@
2222
><strong>{{ showFindingsInPercentage(props.falsePositive) }}</strong></small
2323
>
2424
</div>
25-
</b-progress-bar>
26-
<b-progress-bar
25+
</BProgressBar>
26+
<BProgressBar
2727
v-b-popover.hover.bottom="
2828
getPopOverContent('Clarification Required', props.clarificationRequired)
2929
"
@@ -35,8 +35,8 @@
3535
><strong>{{ showFindingsInPercentage(props.clarificationRequired) }}</strong></small
3636
>
3737
</div>
38-
</b-progress-bar>
39-
<b-progress-bar
38+
</BProgressBar>
39+
<BProgressBar
4040
v-b-popover.hover.bottom="getPopOverContent('Not Accessible', props.notAccessible)"
4141
:value="props.notAccessible"
4242
variant="info"
@@ -46,9 +46,9 @@
4646
><strong>{{ showFindingsInPercentage(props.notAccessible) }}</strong></small
4747
>
4848
</div>
49-
</b-progress-bar>
49+
</BProgressBar>
5050
<!-- @vue-ignore -->
51-
<b-progress-bar
51+
<BProgressBar
5252
v-b-popover.hover.bottom="getPopOverContent('Not Analyzed', props.notAnalyzed)"
5353
:value="props.notAnalyzed"
5454
variant="not-analyzed"
@@ -58,8 +58,8 @@
5858
><strong>{{ showFindingsInPercentage(props.notAnalyzed) }}</strong></small
5959
>
6060
</div>
61-
</b-progress-bar>
62-
<b-progress-bar
61+
</BProgressBar>
62+
<BProgressBar
6363
v-b-popover.hover.bottom="getPopOverContent('Outdated', props.outdated)"
6464
:value="props.outdated"
6565
variant="dark"
@@ -69,11 +69,12 @@
6969
><strong>{{ showFindingsInPercentage(props.outdated) }}</strong></small
7070
>
7171
</div>
72-
</b-progress-bar>
73-
</b-progress>
72+
</BProgressBar>
73+
</BProgress>
7474
</div>
7575
</template>
7676
<script setup lang="ts">
77+
import { BProgress, BProgressBar } from 'bootstrap-vue-next';
7778
type Props = {
7879
truePositive: number;
7980
falsePositive: number;

0 commit comments

Comments
 (0)