Skip to content

Conversation

@clairesunstudio
Copy link
Contributor

@clairesunstudio clairesunstudio commented Oct 22, 2025

Description

This PR:

  • brings in all the new icons from the new DS icon library (based on this Figma changelog
    )
  • consolidates and joins the Patternlab and React icon libraries into a single, shared and consistently-styled icon library
  • adds auto optimization and cleanup scripts in the mayflower-assets library
  • simplifies and making the icon styling consistent in the icon function for Patternlab - the icon() function in patternlab/openmass has been extended to take in name, width, height, classname
  • certain icons, such as the chevron that's using CSS and one-off map-marker icon are not touched. We need to do some more work to those before swapping them out in OpenMass if we feel necessary.

Before:

Screenshot 2025-12-01 at 10 57 53 AM

After:
screencapture-localhost-6006-iframe-html-2025-12-01-10_57_13


To Test:

Test in Mayflower

  • Pull down this branch
  • Run rush icons

This script does a few things:

  1. It runs the prepIcons job in the assets package to strip fill and other attributes from the Figma exported svg icons, and run svgo lossless optimization on them
  2. In Mayflower React: it builds each icon into a React component based on icon-template.js. Note that this step has been taken out of the start script, due to the number of icons slowing down the task
  3. In Mayflower Patternlab: It copies SVG into the source directory and converts them to Twig to display them in patternlab. Note that Mayflower PHP icon function (packages/patternlab/styleguide/source/_twig-components/functions/icon.function.php) uses icons in the assets library directly

Test in Openmass:

@clairesunstudio clairesunstudio force-pushed the assets/DP-39285-update-all-icons branch from 970d4bc to ac6fdc8 Compare October 22, 2025 20:57
Copy link

@prisma-cloud-devsecops prisma-cloud-devsecops bot left a comment

Choose a reason for hiding this comment

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

Prisma Cloud has found errors in this PR ⬇️


} catch (error) {
console.error(`❌ Error processing ${file}:`, error.message);
}

Choose a reason for hiding this comment

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

MEDIUM  Information exposure through an error message
    File: icon-strip-fills.js | Checkov ID: CKV3_SAST_160


How To Fix

throw new Error('An unexpected error occurred');


Description

CWE: CWE-209: Generation of Error Message Containing Sensitive Information
OWASP: A04:2021-Insecure Design

This policy detects information exposure through an error message. If the code contains a pattern that matches either console.trace() or a try-catch block with a function containing one of the following methods: console.log, console.error, console.warn, alert, prompt, or confirm, and the catch block includes a variable $ERR or a variable that contains sensitive information such as message, stack, status, or name, then it is considered a vulnerability.

Vulnerable code example:

javascript
console.trace('Error message containing sensitive information');

The above code is vulnerable because it directly exposes sensitive information through the console.trace method.

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.

2 participants