Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/src/golang.org/x/sync-…
Browse files Browse the repository at this point in the history
…0.6.0
  • Loading branch information
Shengwen YU authored Mar 28, 2024
2 parents 80a3254 + d58172c commit 5563769
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 25 deletions.
4 changes: 3 additions & 1 deletion src/controller/scan/base_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ func (bc *basicController) ScanAll(ctx context.Context, trigger string, async bo
}

err = bc.startScanAll(ctx, executionID)
log.Errorf("failed to start scan all, executionID=%d, error: %v", executionID, err)
if err != nil {
log.Errorf("failed to start scan all, executionID=%d, error: %v", executionID, err)
}
}(bc.makeCtx())
} else {
if err := bc.startScanAll(ctx, executionID); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require (
github.com/robfig/cron/v3 v3.0.1
github.com/spf13/viper v1.8.1
github.com/stretchr/testify v1.8.4
github.com/tencentcloud/tencentcloud-sdk-go v1.0.62
github.com/tencentcloud/tencentcloud-sdk-go v3.0.233+incompatible
github.com/vmihailenco/msgpack/v5 v5.4.1
github.com/volcengine/volcengine-go-sdk v1.0.97
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.46.1
Expand Down
4 changes: 2 additions & 2 deletions src/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tencentcloud/tencentcloud-sdk-go v1.0.62 h1:Vnr3IqaafEuQUciG6D6EaeLJm26Mg8sjAfbI4OoeauM=
github.com/tencentcloud/tencentcloud-sdk-go v1.0.62/go.mod h1:asUz5BPXxgoPGaRgZaVm1iGcUAuHyYUo1nXqKa83cvI=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.233+incompatible h1:q+D/Y9jla3afgsIihtyhwyl0c2W+eRWNM9ohVwPiiPw=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.233+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
Expand Down
34 changes: 17 additions & 17 deletions src/portal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"express": "^4.17.1",
"express": "^4.19.2",
"https-proxy-agent": "^5.0.1",
"jasmine-core": "~4.5.0",
"jasmine-spec-reporter": "~7.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,21 @@ <h4 class="mt-1">
<clr-dg-column class="width-240" [clrDgField]="'url'">{{
'SCANNER.ENDPOINT' | translate
}}</clr-dg-column>
<clr-dg-column>{{ 'SCANNER.HEALTH' | translate }}</clr-dg-column>
<clr-dg-column>{{ 'SCANNER.ENABLED' | translate }}</clr-dg-column>
<clr-dg-column>{{ 'SCANNER.AUTH' | translate }}</clr-dg-column>
<clr-dg-column class="width-120">{{
'SCANNER.HEALTH' | translate
}}</clr-dg-column>
<clr-dg-column class="width-120">{{
'SCANNER.ENABLED' | translate
}}</clr-dg-column>
<clr-dg-column class="width-120">{{
'SCANNER.AUTH' | translate
}}</clr-dg-column>
<clr-dg-column class="width-120">{{
'SCANNER.VULNERABILITY' | translate
}}</clr-dg-column>
<clr-dg-column class="width-120">{{
'SCANNER.SBOM' | translate
}}</clr-dg-column>
<clr-dg-column>{{
'SCANNER.DESCRIPTION' | translate
}}</clr-dg-column>
Expand Down Expand Up @@ -198,6 +210,18 @@ <h4 class="mt-1">
<clr-dg-cell>{{
scanner.auth ? scanner.auth : 'None'
}}</clr-dg-cell>
<clr-dg-cell>{{
(supportCapability(scanner, 'vulnerability')
? 'SCANNER.SUPPORTED'
: 'SCANNER.NOT_SUPPORTED'
) | translate
}}</clr-dg-cell>
<clr-dg-cell>{{
(supportCapability(scanner, 'sbom')
? 'SCANNER.SUPPORTED'
: 'SCANNER.NOT_SUPPORTED'
) | translate
}}</clr-dg-cell>
<clr-dg-cell>{{ scanner.description }}</clr-dg-cell>
<scanner-metadata
*clrIfExpanded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
min-width: 240px !important;
}

.width-120 {
min-width: 120px !important;
}

.margin-top-0 {
margin-top: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,17 @@ export class ConfigurationScannerComponent implements OnInit, OnDestroy {
addSuccess() {
this.getScanners();
}

supportCapability(scanner: Scanner, capabilityType: string): boolean {
return scanner && scanner.metadata && capabilityType
? (
scanner?.metadata?.capabilities?.filter(
({ type }) => type === capabilityType
) ?? []
).length >= 1
: false;
}

changeStat() {
if (this.selectedRow) {
let scanner: ScannerRegistrationReq = clone(this.selectedRow);
Expand Down
4 changes: 4 additions & 0 deletions src/portal/src/i18n/lang/de-de-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,10 @@
"NAME_REQUIRED": "Name ist erforderlich",
"NAME_REX": "Der Name muss mindestens 2 Zeichen lang sein. Mit Kleinbuchstaben, Ziffern und ._-. Er muss mit Buchstaben oder Ziffern beginnen.",
"DESCRIPTION": "Beschreibung",
"SBOM": "SBOM",
"VULNERABILITY": "Vulnerability",
"SUPPORTED": "Supported",
"NOT_SUPPORTED": "Not Supported",
"ENDPOINT": "Endpunkt",
"ENDPOINT_EXISTS": "URL existiert bereits",
"ENDPOINT_REQUIRED": "URL ist erforderlich",
Expand Down
4 changes: 4 additions & 0 deletions src/portal/src/i18n/lang/en-us-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,10 @@
"NAME_REQUIRED": "Name is required",
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
"DESCRIPTION": "Description",
"SBOM": "SBOM",
"VULNERABILITY": "Vulnerability",
"SUPPORTED": "Supported",
"NOT_SUPPORTED": "Not Supported",
"ENDPOINT": "Endpoint",
"ENDPOINT_EXISTS": "EndpointUrl already exists",
"ENDPOINT_REQUIRED": "EndpointUrl is required",
Expand Down
4 changes: 4 additions & 0 deletions src/portal/src/i18n/lang/es-es-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,10 @@
"NAME_REQUIRED": "Name is required",
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
"DESCRIPTION": "Description",
"SBOM": "SBOM",
"VULNERABILITY": "Vulnerability",
"SUPPORTED": "Supported",
"NOT_SUPPORTED": "Not Supported",
"ENDPOINT": "Endpoint",
"ENDPOINT_EXISTS": "EndpointUrl already exists",
"ENDPOINT_REQUIRED": "EndpointUrl is required",
Expand Down
4 changes: 4 additions & 0 deletions src/portal/src/i18n/lang/fr-fr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,10 @@
"NAME_REQUIRED": "Le nom est requis",
"NAME_REX": "Le nom doit comporter au moins 2 caractères avec des minuscules, des chiffres et. _- et doit commencer par des caractères ou des chiffres.",
"DESCRIPTION": "Description",
"SBOM": "SBOM",
"VULNERABILITY": "Vulnerability",
"SUPPORTED": "Supported",
"NOT_SUPPORTED": "Not Supported",
"ENDPOINT": "Endpoint",
"ENDPOINT_EXISTS": "L'URL de l'endpoint existe déjà",
"ENDPOINT_REQUIRED": "L'URL de l'endpoint est requise",
Expand Down
4 changes: 4 additions & 0 deletions src/portal/src/i18n/lang/pt-br-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,10 @@
"NAME_REQUIRED": "Nome é obrigatório",
"NAME_REX": "O nome precisa ter no mínimo 2 caracteres. Pode conter apenas letras minúsculas, numeros, ou símbolos ._- e deve começar por uma letra ou número.",
"DESCRIPTION": "Descrição",
"SBOM": "SBOM",
"VULNERABILITY": "Vulnerability",
"SUPPORTED": "Supported",
"NOT_SUPPORTED": "Not Supported",
"ENDPOINT": "Endereço",
"ENDPOINT_EXISTS": "Endereço já usado por outro examinador",
"ENDPOINT_REQUIRED": "Endereço é obrigatório",
Expand Down
4 changes: 4 additions & 0 deletions src/portal/src/i18n/lang/tr-tr-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,10 @@
"NAME_REQUIRED": "Name is required",
"NAME_REX": "Name should be at least 2 characters long with lower case characters, numbers and ._- and must be start with characters or numbers.",
"DESCRIPTION": "Description",
"SBOM": "SBOM",
"VULNERABILITY": "Vulnerability",
"SUPPORTED": "Supported",
"NOT_SUPPORTED": "Not Supported",
"ENDPOINT": "Endpoint",
"ENDPOINT_EXISTS": "EndpointUrl already exists",
"ENDPOINT_REQUIRED": "EndpointUrl is required",
Expand Down
4 changes: 4 additions & 0 deletions src/portal/src/i18n/lang/zh-cn-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,10 @@
"NAME_REQUIRED": "名称为必填项",
"NAME_REX": "名称由小写字符、数字和._-组成且至少2个字符并以字符或者数字开头。",
"DESCRIPTION": "描述",
"SBOM": "SBOM",
"VULNERABILITY": "Vulnerability",
"SUPPORTED": "Supported",
"NOT_SUPPORTED": "Not Supported",
"ENDPOINT": "地址",
"ENDPOINT_EXISTS": "地址已存在",
"ENDPOINT_REQUIRED": "地址为必填项",
Expand Down
4 changes: 4 additions & 0 deletions src/portal/src/i18n/lang/zh-tw-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,10 @@
"NAME_REQUIRED": "名稱必填",
"NAME_REX": "名稱必須由小寫字母、數字和 ._- 組成,至少2個字元,並且必須以字母或數字開頭。",
"DESCRIPTION": "描述",
"SBOM": "SBOM",
"VULNERABILITY": "Vulnerability",
"SUPPORTED": "Supported",
"NOT_SUPPORTED": "Not Supported",
"ENDPOINT": "端點",
"ENDPOINT_EXISTS": "端點 URL 已存在",
"ENDPOINT_REQUIRED": "端點 URL 必填",
Expand Down

0 comments on commit 5563769

Please sign in to comment.