Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code scanning alert - Inefficient regular expression #357

Closed
1 task
blackfalcon opened this issue Aug 30, 2022 · 1 comment
Closed
1 task

Fix code scanning alert - Inefficient regular expression #357

blackfalcon opened this issue Aug 30, 2022 · 1 comment
Labels
help wanted Extra attention is needed, this user requires assistance to complete the work not-reviewed Issue has not been reviewed by Auro team members Type: Bug Bug or Bug fixes wc-generator
Milestone

Comments

@blackfalcon
Copy link
Member

Tracking issue for:

@blackfalcon blackfalcon self-assigned this Sep 30, 2022
@blackfalcon blackfalcon removed their assignment Jan 11, 2023
@blackfalcon blackfalcon added the not-reviewed Issue has not been reviewed by Auro team members label Jan 20, 2023
@blackfalcon blackfalcon added Status: Active discussion and removed not-reviewed Issue has not been reviewed by Auro team members labels May 3, 2023
blackfalcon added a commit that referenced this issue May 3, 2023
Changes to be committed:
modified:   template/scripts/generateDocs.js
@blackfalcon blackfalcon self-assigned this May 3, 2023
@blackfalcon blackfalcon linked a pull request May 3, 2023 that will close this issue
3 tasks
blackfalcon added a commit that referenced this issue May 5, 2023
Changes to be committed:
modified:   template/scripts/generateDocs.js
@blackfalcon blackfalcon removed a link to a pull request May 5, 2023
3 tasks
@blackfalcon blackfalcon removed this from the Generator RC v4.0 milestone May 5, 2023
@blackfalcon blackfalcon removed their assignment May 5, 2023
@blackfalcon blackfalcon added not-reviewed Issue has not been reviewed by Auro team members and removed Status: Active discussion labels May 5, 2023
@blackfalcon
Copy link
Member Author

Removing this issue from the milestone and putting it back in the pool of work to be refined.

blackfalcon added a commit that referenced this issue May 5, 2023
This commit reverts the following commit

- commit 36ee012

Changes to be committed:
modified:   template/scripts/generateDocs.js
blackfalcon added a commit that referenced this issue May 9, 2023
Changes to be committed:
modified:   template/scripts/generateDocs.js
blackfalcon added a commit that referenced this issue May 9, 2023
This commit reverts the following commit

- commit 36ee012

Changes to be committed:
modified:   template/scripts/generateDocs.js
@settings settings bot removed the auro-generator label May 9, 2023
blackfalcon added a commit that referenced this issue May 9, 2023
This commit reverts the following commit

- commit 36ee012

Changes to be committed:
modified:   template/scripts/generateDocs.js
blackfalcon pushed a commit that referenced this issue May 9, 2023
# [4.0.0](v3.17.4...v4.0.0) (2023-05-09)

### Bug Fixes

* automatically generate TypeScript description files ([dea833e](dea833e))
* generator: update CDN reference [#382](#382) ([cb65617](cb65617))
* **reference:** update to use [@AuroDesignSystem](https://github.com/aurodesignsystem) [#345](#345) ([1a628fa](1a628fa))
* **sec:** remove inefficient regular expression [#357](#357) ([c726423](c726423))
* update docs on issue template ([acd5531](acd5531))

### Features

* address general issues to get build working ([a4eba9a](a4eba9a))
* **typescript:** add typescript support ([a2d48e0](a2d48e0))

### Performance Improvements

* **ignore:** update configs [#385](#385) ([ea52043](ea52043))
* **labs:** remove auroLabs functionality [#339](#339) ([f32d69f](f32d69f))
* remove deprecated stylelint rules [#381](#381) ([568016e](568016e))
* remove IE support [#181](#181) ([c8543b3](c8543b3))
* remove polyfill focus visible ([6b68814](6b68814))
* **review:** add all suggested updates ([268e86a](268e86a))
* **settings:** update labels [#377](#377) ([c2cccf7](c2cccf7))
* **watch:** add apiExamples to generate docs [#320](#320) ([32c005f](32c005f))
* **windows:** update dev script [#274](#274) ([5efb6f8](5efb6f8))

### Reverts

* .npmignore and update .npmignore.temp ([85a135f](85a135f))
* return removed regex [#357](#357) ([08e2957](08e2957))

### BREAKING CHANGES

* **labs:** This commit will remove all functionality related
to the use of AuroLabs as a concept.

Changes to be committed:
modified:   bin/generate.js
modified:   componentDocs/README.md
modified:   componentDocs/README_v4.md
deleted:    componentDocs/partials/labsDisclaimer.md
deleted:    template/.github/settings__labs.yml
modified:   template/scripts/generateDocs.js
Izook added a commit that referenced this issue Jul 6, 2023
@Izook Izook mentioned this issue Jul 6, 2023
3 tasks
@Izook Izook linked a pull request Jul 6, 2023 that will close this issue
3 tasks
blackfalcon pushed a commit that referenced this issue Jul 6, 2023
Izook added a commit that referenced this issue Jul 8, 2023
blackfalcon pushed a commit that referenced this issue Jul 10, 2023
@blackfalcon blackfalcon added this to the Bug squash milestone Nov 28, 2023
@blackfalcon blackfalcon added the help wanted Extra attention is needed, this user requires assistance to complete the work label Dec 27, 2023
fajar-apri-alaska added a commit that referenced this issue Jan 30, 2024
- Update below regex to make it more efficient:
\r\n|\r|\n -> \r?\n|\r

1. The \r\n is redundant to \r checking in current pattern,
and I think we can combine it with the \n checking by using \r?\n
2. At first, I want to also remove the standalone \r because it only for older Mac OS,
but I think we should keep it for backward compatibility, so adding | \r to the pattern.

Changes to be committed:
	modified:   package-lock.json
	modified:   template/scripts/generateDocs.mjs
fajar-apri-alaska added a commit that referenced this issue Jan 30, 2024
- Update below regex to make it more efficient:
\r\n|\r|\n -> \r?\n|\r(?!\n)

1. The \r\n is redundant to \r checking in current pattern,
and I think we can combine it with the \n checking by using \r?\n
2. At first, I want to also remove the standalone \r because it only for older Mac OS,
but I think we should keep it for backward compatibility, so adding | \r to the pattern.
3. Additional (?!\n) in the end is to make sure the \r is not followed by \n,
to avoid exponential backtracking on strings starting with '''
and containing many repetitions of '\r\n'. (per latest CodeQL analysis alert #4)

Changes to be committed:
	modified:   package-lock.json
	modified:   template/scripts/generateDocs.mjs
fajar-apri-alaska added a commit that referenced this issue Jan 30, 2024
- Update below regex to make it more efficient:
\r\n|\r|\n -> \r?\n|\r(?!\n)

1. The \r\n is redundant to \r checking in current pattern,
and I think we can combine it with the \n checking by using \r?\n
2. At first, I want to also remove the standalone \r because it only for older Mac OS,
but I think we should keep it for backward compatibility, so adding | \r to the pattern.
3. Additional (?!\n) in the end is to make sure the \r is not followed by \n,
to avoid exponential backtracking on strings starting with '''
and containing many repetitions of '\r\n'. (per latest [CodeQL analysis alert](https://github.com/AlaskaAirlines/WC-Generator/security/code-scanning/3))

Changes to be committed:
	modified:   package-lock.json
	modified:   template/scripts/generateDocs.mjs
blackfalcon pushed a commit that referenced this issue Feb 2, 2024
- Update below regex to make it more efficient:
\r\n|\r|\n -> \r?\n|\r(?!\n)

1. The \r\n is redundant to \r checking in current pattern,
and I think we can combine it with the \n checking by using \r?\n
2. At first, I want to also remove the standalone \r because it only for older Mac OS,
but I think we should keep it for backward compatibility, so adding | \r to the pattern.
3. Additional (?!\n) in the end is to make sure the \r is not followed by \n,
to avoid exponential backtracking on strings starting with '''
and containing many repetitions of '\r\n'. (per latest [CodeQL analysis alert](https://github.com/AlaskaAirlines/WC-Generator/security/code-scanning/3))

Changes to be committed:
	modified:   package-lock.json
	modified:   template/scripts/generateDocs.mjs
blackfalcon pushed a commit that referenced this issue Feb 2, 2024
## [4.4.10](v4.4.9...v4.4.10) (2024-02-02)

### Bug Fixes

* update inefficient RegEx [#357](#357) ([8e24c16](8e24c16))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed, this user requires assistance to complete the work not-reviewed Issue has not been reviewed by Auro team members Type: Bug Bug or Bug fixes wc-generator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants