Skip to content

Commit 684e2df

Browse files
authored
Merge pull request #96 from aligent/fix/aikido-security-sast-25820388-i8q5
[Aikido] AI Fix for Template Injection in GitHub Workflows Action
2 parents 02ef788 + df462d1 commit 684e2df

3 files changed

Lines changed: 30 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,14 @@ jobs:
5353
ORO_STORE_URL: ${{ secrets.ORO_STORE_URL }}
5454
STORE_HASH: ${{ secrets.STORE_HASH }}
5555
X_AUTH_TOKEN: ${{ secrets.X_AUTH_TOKEN }}
56-
run: yarn nx docker-build ${{ inputs.application }}
56+
APPLICATION: ${{ inputs.application }}
57+
run: yarn nx docker-build $APPLICATION
5758

5859
- name: Save Docker image to a tar file
60+
env:
61+
APPLICATION: ${{ inputs.application }}
5962
run: |
60-
docker save ${{ inputs.application }}:latest -o /tmp/${{ inputs.application }}.tar
63+
docker save $APPLICATION:latest -o /tmp/$APPLICATION.tar
6164
6265
- name: Upload Docker image as artifact
6366
uses: actions/upload-artifact@v4

.github/workflows/owasp.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ jobs:
3838
path: code
3939

4040
- name: Fetch dependency check script
41+
env:
42+
INPUT_VERSION: ${{ inputs.version }}
4143
run: |
42-
if [ -z "${{ inputs.version }}" ]; then
44+
if [ -z "$INPUT_VERSION" ]; then
4345
VERSION=$(curl -s https://jeremylong.github.io/DependencyCheck/current.txt)
4446
else
45-
VERSION=${{ inputs.version }}
47+
VERSION=$INPUT_VERSION
4648
fi
4749
curl -Ls "https://github.com/jeremylong/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip" --output dependency-check.zip
4850

packages/modules/bigcommerce/src/factories/helpers/__tests__/__data__/transform-product-location-data.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ export const productInventoryLocation: VariantInventory = {
44
isInStock: true,
55
aggregated: {
66
availableToSell: 31,
7+
availableOnHand: 31,
78
warningLevel: 2,
9+
unlimitedBackorder: false,
810
},
911
byLocation: {
12+
pageInfo: {
13+
hasNextPage: false,
14+
hasPreviousPage: false,
15+
},
1016
edges: [
1117
{
12-
// @ts-expect-error: error is due to required but deprecated field locationEntityServiceTypeIds
18+
cursor: 'cursor1',
1319
node: {
1420
locationEntityId: 1,
1521
locationEntityCode: 'BC-LOCATION-1',
@@ -18,10 +24,12 @@ export const productInventoryLocation: VariantInventory = {
1824
availableToSell: 11,
1925
warningLevel: 2,
2026
isInStock: true,
27+
backorderMessage: '',
28+
locationEntityServiceTypeIds: [],
2129
},
2230
},
2331
{
24-
// @ts-expect-error: error is due to required but deprecated field locationEntityServiceTypeIds
32+
cursor: 'cursor2',
2533
node: {
2634
locationEntityId: 2,
2735
locationEntityCode: 'BIGC-2',
@@ -30,10 +38,12 @@ export const productInventoryLocation: VariantInventory = {
3038
availableToSell: 20,
3139
warningLevel: 0,
3240
isInStock: true,
41+
backorderMessage: '',
42+
locationEntityServiceTypeIds: [],
3343
},
3444
},
3545
{
36-
// @ts-expect-error: error is due to required but deprecated field locationEntityServiceTypeIds
46+
cursor: 'cursor3',
3747
node: {
3848
locationEntityId: 3,
3949
locationEntityCode: '',
@@ -42,6 +52,8 @@ export const productInventoryLocation: VariantInventory = {
4252
availableToSell: 0,
4353
warningLevel: 0,
4454
isInStock: false,
55+
backorderMessage: '',
56+
locationEntityServiceTypeIds: [],
4557
},
4658
},
4759
],
@@ -57,6 +69,8 @@ export const transformedProductLocations = [
5769
availableToSell: 11,
5870
warningLevel: 2,
5971
isInStock: true,
72+
backorderMessage: '',
73+
locationEntityServiceTypeIds: [],
6074
__typename: 'ByLocation',
6175
},
6276
{
@@ -67,6 +81,8 @@ export const transformedProductLocations = [
6781
availableToSell: 20,
6882
warningLevel: 0,
6983
isInStock: true,
84+
backorderMessage: '',
85+
locationEntityServiceTypeIds: [],
7086
__typename: 'ByLocation',
7187
},
7288
{
@@ -77,6 +93,8 @@ export const transformedProductLocations = [
7793
availableToSell: 0,
7894
warningLevel: 0,
7995
isInStock: false,
96+
backorderMessage: '',
97+
locationEntityServiceTypeIds: [],
8098
__typename: 'ByLocation',
8199
},
82100
];

0 commit comments

Comments
 (0)