Skip to content

Commit 3969b81

Browse files
committed
Merge remote-tracking branch 'upstream/master' into Issue-1775-policy-component-hash
2 parents 1d1793a + 2c2f73c commit 3969b81

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/i18n/locales/en.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"name": "Name",
6060
"published": "Published",
6161
"cwe": "CWE",
62+
"cwe_full": "Common Weakness Enumeration (CWE)",
6263
"cwe_id": "CWE ID",
6364
"cwe_desc": "Common Weakness Enumeration (CWE) is a taxonomy of software and hardware weakness types",
6465
"select_cwe": "Select CWE",
@@ -548,7 +549,9 @@
548549
"is": "is",
549550
"is_not": "is not",
550551
"matches": "matches",
551-
"no_match": "does not match"
552+
"no_match": "does not match",
553+
"contains_any": "contains any",
554+
"contains_all": "contains all"
552555
},
553556
"hashes" : {
554557
"md5": "MD5",

src/views/policy/PolicyCondition.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
{value: 'CPE', text: this.$t('message.cpe_full')},
7575
{value: 'SWID_TAGID', text: this.$t('message.swid_tagid')},
7676
{value: 'VERSION', text: this.$t('message.version')},
77-
{value: 'COMPONENT_HASH', text: this.$t('message.component_hash')}
77+
{value: 'COMPONENT_HASH', text: this.$t('message.component_hash')},
78+
{value: 'CWE', text: this.$t('message.cwe_full')}
7879
],
7980
objectOperators: [
8081
{value: 'IS', text: this.$t('operator.is')},
@@ -104,7 +105,11 @@
104105
{value: 'BLAKE2b-256', text: this.$t('hashes.blake_256')},
105106
{value: 'BLAKE2b-384', text: this.$t('hashes.blake_384')},
106107
{value: 'BLAKE2b-512', text: this.$t('hashes.blake_512')},
107-
{value: 'BLAKE3', text: this.$t('hashes.blake3')},
108+
{value: 'BLAKE3', text: this.$t('hashes.blake3')}
109+
],
110+
listOperators: [
111+
{value: 'CONTAINS_ANY', text: this.$t('operator.contains_any')},
112+
{value: 'CONTAINS_ALL', text: this.$t('operator.contains_all')}
108113
],
109114
operators: [],
110115
possibleValues: []
@@ -137,6 +142,8 @@
137142
return false;
138143
case 'COMPONENT_HASH':
139144
return false;
145+
case 'CWE':
146+
return false;
140147
default:
141148
return false;
142149
}
@@ -194,6 +201,9 @@
194201
case 'COMPONENT_HASH':
195202
this.operators = this.hashAlgorithms;
196203
break;
204+
case 'CWE':
205+
this.operators = this.listOperators;
206+
break;
197207
default:
198208
this.operators = [];
199209
}

0 commit comments

Comments
 (0)