Skip to content

Commit

Permalink
Merge branch 'main' into crawler_integration
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilczaja authored Oct 11, 2024
2 parents 1a71a7d + bcd9697 commit d4ba502
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 27 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/license_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ jobs:
uses: actions/checkout@v3

- name: Run license scanner
uses: aquasecurity/trivy-action@master
uses: aquasecurity/[email protected]
env:
#try default GitHub DBs, if failing, use AWS mirror instead (https://github.com/aquasecurity/trivy-action/issues/389)
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
scan-type: "rootfs"
scan-ref: "."
Expand All @@ -32,7 +36,11 @@ jobs:
- name: npm install (authority-portal-frontend)
run: cd authority-portal-frontend && npm install
- name: Run license scanner
uses: aquasecurity/trivy-action@master
uses: aquasecurity/[email protected]
env:
#try default GitHub DBs, if failing, use AWS mirror instead (https://github.com/aquasecurity/trivy-action/issues/389)
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
scan-type: "repo"
scan-ref: "."
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/secret_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Run vulnerability scanner
uses: aquasecurity/trivy-action@master
uses: aquasecurity/[email protected]
env:
#try default GitHub DBs, if failing, use AWS mirror instead (https://github.com/aquasecurity/trivy-action/issues/389)
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
scan-type: "fs"
exit-code: "1"
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/security_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Run static analysis (rootfs)
uses: aquasecurity/trivy-action@master
uses: aquasecurity/[email protected]
env:
#try default GitHub DBs, if failing, use AWS mirror instead (https://github.com/aquasecurity/trivy-action/issues/389)
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
scan-type: "rootfs"
scanners: "vuln,misconfig"
ignore-unfixed: true
format: 'table'
severity: "CRITICAL,HIGH"
- name: Run static analysis (repo)
uses: aquasecurity/trivy-action@master
uses: aquasecurity/[email protected]
env:
#try default GitHub DBs, if failing, use AWS mirror instead (https://github.com/aquasecurity/trivy-action/issues/389)
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
scan-type: "repo"
scanners: "vuln,misconfig"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md).
#### Patch

- Added documentation for roles and rights ([#334](https://github.com/sovity/authority-portal/issues/334))
- Fixed Confirm and Delete buttons' behavior in confirmation modals ([#304](https://github.com/sovity/authority-portal/issues/304))
- Fixed final step not showing when registering a central component ([#305](https://github.com/sovity/authority-portal/issues/305))
- Fixed My Organization page not updated when switching between environments ([#255](https://github.com/sovity/authority-portal/issues/255))

### Known issues

Expand Down

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

16 changes: 8 additions & 8 deletions authority-portal-frontend/package-lock.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class RegisterCentralComponentPageComponent
() => {
setTimeout(() => {
this.stepper.next();
}, 0);
}, 300);
},
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {Router} from '@angular/router';
import {Subject, takeUntil} from 'rxjs';
import {Store} from '@ngxs/store';
import {MemberInfo} from '@sovity.de/authority-portal-client';
import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils';
import {BreadcrumbService} from '../../../shared/common/portal-layout/breadcrumb/breadcrumb.service';
import {Reset} from './state/control-center-organization-members-page-action';
import {
Expand All @@ -37,11 +38,13 @@ export class ControlCenterOrganizationMembersPageComponent
private store: Store,
private router: Router,
private breadcrumbService: BreadcrumbService,
private globalStateUtils: GlobalStateUtils,
) {}

ngOnInit(): void {
this.refresh();
this.startListeningToState();
this.startRefreshingOnEnvChange();
}

refresh(): void {
Expand Down Expand Up @@ -69,6 +72,15 @@ export class ControlCenterOrganizationMembersPageComponent
this.router.navigate(['control-center/users-and-roles', user.userId]);
}

startRefreshingOnEnvChange() {
this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({
ngOnDestroy$: this.ngOnDestroy$,
onChanged: () => {
this.refresh();
},
});
}

ngOnDestroy$ = new Subject();
ngOnDestroy(): void {
this.ngOnDestroy$.next(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Subject, takeUntil} from 'rxjs';
import {Store} from '@ngxs/store';
import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils';
import {Reset} from '../state/control-center-organization-profile-page-action';
import {
ControlCenterOrganizationProfilePageState,
Expand All @@ -30,11 +31,15 @@ export class ControlCenterOrganizationProfilePageComponent
state: ControlCenterOrganizationProfilePageState =
DEFAULT_CONTROL_CENTER_ORGANIZATION_PROFILE_PAGE_STATE;

constructor(private store: Store) {}
constructor(
private store: Store,
private globalStateUtils: GlobalStateUtils,
) {}

ngOnInit(): void {
this.refresh();
this.startListeningToState();
this.startRefreshingOnEnvChange();
}

refresh(): void {
Expand All @@ -52,6 +57,15 @@ export class ControlCenterOrganizationProfilePageComponent
});
}

startRefreshingOnEnvChange() {
this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({
ngOnDestroy$: this.ngOnDestroy$,
onChanged: () => {
this.refresh();
},
});
}

ngOnDestroy$ = new Subject();
ngOnDestroy(): void {
this.ngOnDestroy$.next(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Subject, takeUntil} from 'rxjs';
import {Store} from '@ngxs/store';
import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils';
import {Reset} from '../state/control-center-user-profile-page-action';
import {
ControlCenterUserProfilePageState,
Expand All @@ -30,11 +31,15 @@ export class ControlCenterUserProfilePageComponent
state: ControlCenterUserProfilePageState =
DEFAULT_CONTROL_CENTER_USER_PROFILE_PAGE_STATE;

constructor(private store: Store) {}
constructor(
private store: Store,
private globalStateUtils: GlobalStateUtils,
) {}

ngOnInit(): void {
this.refresh();
this.startListeningToState();
this.startRefreshingOnEnvChange();
}

refresh(): void {
Expand All @@ -52,6 +57,15 @@ export class ControlCenterUserProfilePageComponent
});
}

startRefreshingOnEnvChange() {
this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({
ngOnDestroy$: this.ngOnDestroy$,
onChanged: () => {
this.refresh();
},
});
}

ngOnDestroy$ = new Subject();
ngOnDestroy(): void {
this.ngOnDestroy$.next(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</mat-dialog-content>
<mat-dialog-actions class="flex gap-3" align="end">
<button
*ngFor="let button of confirmationDialog.actionButtons.reverse()"
*ngFor="let button of confirmationDialog.actionButtons"
[ngClass]="button?.style || 'btn-accent-outline'"
(click)="actionHandler(button.action)">
{{ button.label }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ export class ConfirmationDialogComponent {
private dialogRef: MatDialogRef<ConfirmationDialogComponent>,
@Inject(MAT_DIALOG_DATA) public confirmationDialog: ConfirmationDialog,
) {
this.confirmationDialog.actionButtons.push({
label: 'Cancel',
action: 'CANCEL',
});
this.confirmationDialog = {
...this.confirmationDialog,
actionButtons: [
...this.confirmationDialog.actionButtons,
{
label: 'Cancel',
action: 'CANCEL',
},
].reverse(),
};
}

actionHandler(action: string) {
Expand Down

0 comments on commit d4ba502

Please sign in to comment.