Skip to content

Commit

Permalink
refactor: make anchors compliant with checkmarx (#15932)
Browse files Browse the repository at this point in the history
Anchors tags have been refactored to be compliant with the new pipeline security check.
Attribute 'rel' has been added to anchors that are using _blank as target.
  • Loading branch information
FollowTheFlo committed Jun 30, 2022
1 parent b4b8445 commit 14ab49c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[routerLink]="{ cxRoute: 'termsAndConditions' } | cxUrl"
class="cx-tc-link"
target="_blank"
rel="noopener noreferrer"
>
{{ 'checkoutReview.termsAndConditions' | cxTranslate }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[routerLink]="{ cxRoute: 'termsAndConditions' } | cxUrl"
class="cx-tc-link"
target="_blank"
rel="noopener noreferrer"
>
{{ 'checkoutReview.termsAndConditions' | cxTranslate }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@
</div>
<div class="shipment-content">
<ng-container *ngIf="consignmentTracking?.trackingUrl">
<a target="_blank" [href]="consignmentTracking.trackingUrl">{{
consignmentTracking?.trackingID
}}</a>
<a
target="_blank"
rel="noopener noreferrer"
[href]="consignmentTracking.trackingUrl"
>{{ consignmentTracking?.trackingID }}</a
>
</ng-container>
<ng-container *ngIf="!consignmentTracking?.trackingUrl">
<label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
aria-hidden="true"
href="{{ getDirections(location) }}"
target="_blank"
rel="noopener noreferrer"
class="btn btn-sm btn-action btn-block cx-button"
(click)="$event.stopPropagation()"
[attr.aria-label]="'storeFinder.ariaLabelGetDirections' | cxTranslate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h2 aria-hidden="true">{{ location.displayName || location.name }}</h2>
class="cx-link"
[href]="getDirections(location)"
target="_blank"
rel="noopener noreferrer"
[attr.aria-label]="
'storeFinder.ariaLabelGetDirections' | cxTranslate
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
<a
[routerLink]="{ cxRoute: 'termsAndConditions' } | cxUrl"
target="_blank"
rel="noopener noreferrer"
>
{{ 'register.termsAndConditions' | cxTranslate }}
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ng-container *ngIf="data$ | async as data">
<div class="pdf-container">
<a [href]="url" target="_blank">
<a [href]="url" target="_blank" rel="noopener noreferrer">
<span>{{
addPdfExtension(
data?.title ||
Expand Down

0 comments on commit 14ab49c

Please sign in to comment.