Skip to content

Commit 02ef788

Browse files
Merge pull request #93 from aligent/fix/aikido-security-sast--6511476-kgtW
[Aikido] AI Fix for Template Injection in GitHub Workflows Action
2 parents f7f4c7e + d18575f commit 02ef788

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/pull-request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ jobs:
1919
ref: ${{ github.event.pull_request.head.ref }}
2020

2121
- name: Fetch target
22-
run: git fetch origin ${{ github.event.pull_request.base.ref }}
22+
env:
23+
BASE_REF: ${{ github.event.pull_request.base.ref }}
24+
run: git fetch origin $BASE_REF
2325

2426
- uses: actions/setup-node@v4
2527
with:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ npm install --global yarn
5555

5656
2. Run `yarn install`
5757

58-
3. Duplicate the `.env.template` file as `.env` for the mesh you are working on, fill in the values and place it in the corrosponding mesh directory.
58+
3. Duplicate the `.env.template` file as `.env` for the mesh you are working on, fill in the values and place it in the corresponding mesh directory.
5959

6060
BigCommerce:
6161

packages/modules/bigcommerce/src/factories/helpers/transform-wishlists.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
import { WishlistConnection, WishlistItemConnection } from '@aligent/bigcommerce-operations';
12
import {
23
ConfigurableProduct,
34
Maybe,
45
ProductInterface,
56
Wishlist,
6-
WishlistVisibilityEnum,
77
WishlistItemInterface,
8+
WishlistVisibilityEnum,
89
} from '@aligent/bigcommerce-resolvers';
9-
import { WishlistConnection, WishlistItemConnection } from '@aligent/bigcommerce-operations';
10-
import { getTransformedProductData } from '../transform-products-data';
1110
import { isTruthy } from '@aligent/utils';
11+
import { getTransformedProductData } from '../transform-products-data';
1212

1313
export const getTransformedWishlists = (wishlists: WishlistConnection): Array<Wishlist> => {
1414
if (!wishlists.edges) return [];
@@ -43,7 +43,7 @@ export const getTransformedWishListItems = (
4343
if (!wishListItems.edges) return [];
4444
return wishListItems.edges
4545
.map((wishlistItem) => {
46-
if (!wishlistItem || !wishlistItem.node) return null;
46+
if (!wishlistItem || !wishlistItem.node || !wishlistItem.node.product) return null;
4747
const { entityId, variantEntityId: wishlistItemVariantId } = wishlistItem.node;
4848
const transformedProduct = getTransformedProductData(
4949
wishlistItem.node.product,

0 commit comments

Comments
 (0)