aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorstanislavh <stanislav.honcharov@sonarsource.com>2024-07-25 12:27:25 +0200
committersonartech <sonartech@sonarsource.com>2024-07-26 20:02:48 +0000
commita03200b5b3dc0f175756a6b3b814888d019f8ce8 (patch)
tree738c634918e58a1c02613f10da40ce0fc73be626 /server
parentca303d9b3ff58d12e14cabfbb58731f74b274663 (diff)
downloadsonarqube-a03200b5b3dc0f175756a6b3b814888d019f8ce8.tar.gz
sonarqube-a03200b5b3dc0f175756a6b3b814888d019f8ce8.zip
SONAR-22542 Fix new links for casa & stig standards
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts6
-rw-r--r--server/sonar-web/src/main/js/apps/issues/utils.ts6
-rw-r--r--server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx2
-rw-r--r--server/sonar-web/src/main/js/helpers/mocks/issues.ts2
-rw-r--r--server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts2
5 files changed, 17 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts
index d931d5ee29d..b740749ec9d 100644
--- a/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts
+++ b/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts
@@ -53,6 +53,8 @@ describe('serialize/deserialize', () => {
createdInLast: 'a',
cwe: ['18', '19'],
directories: ['a', 'b'],
+ casa: ['a', 'b'],
+ 'stig-ASD_V5R3': ['a', 'b'],
files: ['a', 'b'],
issues: ['a', 'b'],
languages: ['a', 'b'],
@@ -92,6 +94,8 @@ describe('serialize/deserialize', () => {
issues: 'a,b',
languages: 'a,b',
owaspTop10: 'a,b',
+ casa: 'a,b',
+ 'stig-ASD_V5R3': 'a,b',
'owaspTop10-2021': 'a,b',
'pciDss-3.2': 'a,b',
'pciDss-4.0': 'a,b',
@@ -134,6 +138,8 @@ describe('serialize/deserialize', () => {
createdBefore: undefined,
createdInLast: '',
cwe: [],
+ 'stig-ASD_V5R3': [],
+ casa: [],
directories: [],
files: [],
impactSeverities: [SoftwareImpactSeverity.Low],
diff --git a/server/sonar-web/src/main/js/apps/issues/utils.ts b/server/sonar-web/src/main/js/apps/issues/utils.ts
index 918c638d948..ba190bbe98d 100644
--- a/server/sonar-web/src/main/js/apps/issues/utils.ts
+++ b/server/sonar-web/src/main/js/apps/issues/utils.ts
@@ -61,6 +61,7 @@ export interface Query {
assigned: boolean;
assignees: string[];
author: string[];
+ casa: string[];
cleanCodeAttributeCategories: CleanCodeAttributeCategory[];
codeVariants: string[];
createdAfter: Date | undefined;
@@ -90,6 +91,7 @@ export interface Query {
severities: string[];
sonarsourceSecurity: string[];
sort: string;
+ 'stig-ASD_V5R3': string[];
tags: string[];
types: string[];
}
@@ -121,6 +123,7 @@ export function parseQuery(query: RawQuery, needIssueSync = false): Query {
query.impactSoftwareQualities,
parseAsString,
),
+ 'stig-ASD_V5R3': parseAsArray(query['stig-ASD_V5R3'], parseAsString),
inNewCodePeriod: parseAsBoolean(query.inNewCodePeriod, false),
issues: parseAsArray(query.issues, parseAsString),
languages: parseAsArray(query.languages, parseAsString),
@@ -128,6 +131,7 @@ export function parseQuery(query: RawQuery, needIssueSync = false): Query {
'owaspTop10-2021': parseAsArray(query['owaspTop10-2021'], parseAsString),
'pciDss-3.2': parseAsArray(query['pciDss-3.2'], parseAsString),
'pciDss-4.0': parseAsArray(query['pciDss-4.0'], parseAsString),
+ casa: parseAsArray(query['casa'], parseAsString),
[OWASP_ASVS_4_0]: parseAsArray(query[OWASP_ASVS_4_0], parseAsString),
owaspAsvsLevel: parseAsString(query['owaspAsvsLevel']),
projects: parseAsArray(query.projects, parseAsString),
@@ -239,6 +243,8 @@ export function serializeQuery(query: Query): RawQuery {
owaspTop10: serializeStringArray(query.owaspTop10),
'owaspTop10-2021': serializeStringArray(query['owaspTop10-2021']),
'pciDss-3.2': serializeStringArray(query['pciDss-3.2']),
+ casa: serializeStringArray(query['casa']),
+ 'stig-ASD_V5R3': serializeStringArray(query['stig-ASD_V5R3']),
'pciDss-4.0': serializeStringArray(query['pciDss-4.0']),
[OWASP_ASVS_4_0]: serializeStringArray(query[OWASP_ASVS_4_0]),
owaspAsvsLevel: serializeString(query['owaspAsvsLevel']),
diff --git a/server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx b/server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx
index a0ddf19618b..af9e4679bc2 100644
--- a/server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx
+++ b/server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx
@@ -100,7 +100,7 @@ export default function FilterBarTemplate(props: Readonly<Props>) {
id={id}
>
<Filterbar
- className={classNames('sw--mt-8 sw-z-filterbar', {
+ className={classNames('sw-z-filterbar', {
'sw-col-span-3': size === 'default',
'sw-col-span-4': size === 'large',
bordered: Boolean(header),
diff --git a/server/sonar-web/src/main/js/helpers/mocks/issues.ts b/server/sonar-web/src/main/js/helpers/mocks/issues.ts
index 0379800351b..bb57d300303 100644
--- a/server/sonar-web/src/main/js/helpers/mocks/issues.ts
+++ b/server/sonar-web/src/main/js/helpers/mocks/issues.ts
@@ -70,6 +70,8 @@ export function mockQuery(overrides: Partial<Query> = {}): Query {
issues: [],
languages: [],
owaspTop10: [],
+ casa: [],
+ 'stig-ASD_V5R3': [],
'owaspTop10-2021': [],
'pciDss-3.2': [],
'pciDss-4.0': [],
diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts
index f7cf3ec13f8..deddc67a9be 100644
--- a/server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts
+++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts
@@ -77,6 +77,8 @@ export function getComponentSecurityHotspotsUrl(
SecurityStandard.PCI_DSS_3_2,
SecurityStandard.PCI_DSS_4_0,
SecurityStandard.OWASP_ASVS_4_0,
+ SecurityStandard.CASA,
+ SecurityStandard.STIG_ASD_V5R3,
'owaspAsvsLevel',
]),
}),