feat: add datatest to consume ef tests.#119
Merged
Merged
Conversation
mpaulucci
commented
Jul 4, 2024
| datatest_stable::harness!( | ||
| eip4788_tests, | ||
| "vectors/cancun/eip4788_beacon_root", | ||
| r"^.*beacon_root_contract_calls.json" |
Collaborator
Author
There was a problem hiding this comment.
we can relax this regex once we start adding support for more tests
klaus993
added a commit
that referenced
this pull request
Mar 5, 2026
Fixes CodeQL alert #119 (js/incomplete-multi-character-sanitization).
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Mar 5, 2026
…6322) ## Summary Fixes [CodeQL alert #119](https://github.com/lambdaclass/ethrex/security/code-scanning/119) (`js/incomplete-multi-character-sanitization`). ### Problem In `.github/scripts/set-pr-status.js`, `extractLinkedIssueNumbers` strips HTML comments from PR bodies before extracting "closes #N" keywords. The regex used a single-pass replacement: ```js const withoutComments = body.replace(/<!--[\s\S]*?-->/g, ""); ``` A single-pass replacement of `<!--...-->` can leave behind a valid HTML comment if the input is crafted so that removing one match creates a new one. For example, input `<!-<!-- foo -->->` would produce `<!-- foo -->` after one pass. This means a malicious PR author could hide closing keywords inside crafted comment nesting to manipulate project board status. The practical risk is low (CI context, trusted-ish input), but the fix is trivial. ### Fix Replace the single-pass `.replace()` with a loop that repeats until stable: ```js let withoutComments = body; let previous; do { previous = withoutComments; withoutComments = withoutComments.replace(/<!--[\s\S]*?-->/g, ""); } while (withoutComments !== previous); ``` This is the approach recommended by [CodeQL's own documentation](https://codeql.github.com/codeql-query-help/javascript/js-incomplete-multi-character-sanitization/) for this exact alert type. ## Test plan - No behavioral change for normal PR bodies — the single pass already removes all comments; the loop just adds a no-op second iteration confirming stability - Edge case: nested/overlapping comment markers like `<!-<!-- foo -->->` are now fully stripped across multiple iterations - Resolves CodeQL alert `js/incomplete-multi-character-sanitization`
lakshya-sky
pushed a commit
to lakshya-sky/ethrex
that referenced
this pull request
Mar 10, 2026
…ambdaclass#6322) ## Summary Fixes [CodeQL alert lambdaclass#119](https://github.com/lambdaclass/ethrex/security/code-scanning/119) (`js/incomplete-multi-character-sanitization`). ### Problem In `.github/scripts/set-pr-status.js`, `extractLinkedIssueNumbers` strips HTML comments from PR bodies before extracting "closes #N" keywords. The regex used a single-pass replacement: ```js const withoutComments = body.replace(/<!--[\s\S]*?-->/g, ""); ``` A single-pass replacement of `<!--...-->` can leave behind a valid HTML comment if the input is crafted so that removing one match creates a new one. For example, input `<!-<!-- foo -->->` would produce `<!-- foo -->` after one pass. This means a malicious PR author could hide closing keywords inside crafted comment nesting to manipulate project board status. The practical risk is low (CI context, trusted-ish input), but the fix is trivial. ### Fix Replace the single-pass `.replace()` with a loop that repeats until stable: ```js let withoutComments = body; let previous; do { previous = withoutComments; withoutComments = withoutComments.replace(/<!--[\s\S]*?-->/g, ""); } while (withoutComments !== previous); ``` This is the approach recommended by [CodeQL's own documentation](https://codeql.github.com/codeql-query-help/javascript/js-incomplete-multi-character-sanitization/) for this exact alert type. ## Test plan - No behavioral change for normal PR bodies — the single pass already removes all comments; the loop just adds a no-op second iteration confirming stability - Edge case: nested/overlapping comment markers like `<!-<!-- foo -->->` are now fully stripped across multiple iterations - Resolves CodeQL alert `js/incomplete-multi-character-sanitization`
iovoid
pushed a commit
that referenced
this pull request
Mar 16, 2026
…6322) ## Summary Fixes [CodeQL alert #119](https://github.com/lambdaclass/ethrex/security/code-scanning/119) (`js/incomplete-multi-character-sanitization`). ### Problem In `.github/scripts/set-pr-status.js`, `extractLinkedIssueNumbers` strips HTML comments from PR bodies before extracting "closes #N" keywords. The regex used a single-pass replacement: ```js const withoutComments = body.replace(/<!--[\s\S]*?-->/g, ""); ``` A single-pass replacement of `<!--...-->` can leave behind a valid HTML comment if the input is crafted so that removing one match creates a new one. For example, input `<!-<!-- foo -->->` would produce `<!-- foo -->` after one pass. This means a malicious PR author could hide closing keywords inside crafted comment nesting to manipulate project board status. The practical risk is low (CI context, trusted-ish input), but the fix is trivial. ### Fix Replace the single-pass `.replace()` with a loop that repeats until stable: ```js let withoutComments = body; let previous; do { previous = withoutComments; withoutComments = withoutComments.replace(/<!--[\s\S]*?-->/g, ""); } while (withoutComments !== previous); ``` This is the approach recommended by [CodeQL's own documentation](https://codeql.github.com/codeql-query-help/javascript/js-incomplete-multi-character-sanitization/) for this exact alert type. ## Test plan - No behavioral change for normal PR bodies — the single pass already removes all comments; the loop just adds a no-op second iteration confirming stability - Edge case: nested/overlapping comment markers like `<!-<!-- foo -->->` are now fully stripped across multiple iterations - Resolves CodeQL alert `js/incomplete-multi-character-sanitization`
Muzry
pushed a commit
to Muzry/ethrex
that referenced
this pull request
Mar 17, 2026
…ambdaclass#6322) ## Summary Fixes [CodeQL alert lambdaclass#119](https://github.com/lambdaclass/ethrex/security/code-scanning/119) (`js/incomplete-multi-character-sanitization`). ### Problem In `.github/scripts/set-pr-status.js`, `extractLinkedIssueNumbers` strips HTML comments from PR bodies before extracting "closes #N" keywords. The regex used a single-pass replacement: ```js const withoutComments = body.replace(/<!--[\s\S]*?-->/g, ""); ``` A single-pass replacement of `<!--...-->` can leave behind a valid HTML comment if the input is crafted so that removing one match creates a new one. For example, input `<!-<!-- foo -->->` would produce `<!-- foo -->` after one pass. This means a malicious PR author could hide closing keywords inside crafted comment nesting to manipulate project board status. The practical risk is low (CI context, trusted-ish input), but the fix is trivial. ### Fix Replace the single-pass `.replace()` with a loop that repeats until stable: ```js let withoutComments = body; let previous; do { previous = withoutComments; withoutComments = withoutComments.replace(/<!--[\s\S]*?-->/g, ""); } while (withoutComments !== previous); ``` This is the approach recommended by [CodeQL's own documentation](https://codeql.github.com/codeql-query-help/javascript/js-incomplete-multi-character-sanitization/) for this exact alert type. ## Test plan - No behavioral change for normal PR bodies — the single pass already removes all comments; the loop just adds a no-op second iteration confirming stability - Edge case: nested/overlapping comment markers like `<!-<!-- foo -->->` are now fully stripped across multiple iterations - Resolves CodeQL alert `js/incomplete-multi-character-sanitization`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
We want to be able to consume tests from the fixture files provided by the EF
Description
Adds datatest boilerplate with one working example.