Skip to content

Comments

Bindings and metadata overwrite warning#8283

Merged
Spacesai1or merged 2 commits intodevelopfrom
wyatt/bindgen/output-overwrite-warning
Dec 16, 2023
Merged

Bindings and metadata overwrite warning#8283
Spacesai1or merged 2 commits intodevelopfrom
wyatt/bindgen/output-overwrite-warning

Conversation

@Spacesai1or
Copy link
Contributor

@Spacesai1or Spacesai1or commented Nov 27, 2023

This PR adds a check for an existing bindings and metadata output files before overwriting them with newly generated files. The rationale for this mitigation: if the bindings for a contract already exist, compare them against newly generated outputs. If they differ, return an error to be handled manually

@Spacesai1or
Copy link
Contributor Author

Spacesai1or commented Nov 27, 2023

This was referenced Nov 27, 2023
@semgrep-app
Copy link
Contributor

semgrep-app bot commented Nov 27, 2023

Semgrep found 2 import-text-template findings:

  • op-bindings/bindgen/remote_handlers.go: L11
  • op-bindings/bindgen/generator_local.go: L12

When working with web applications that involve rendering user-generated content, it's important to properly escape any HTML content to prevent Cross-Site Scripting (XSS) attacks. In Go, the text/template package does not automatically escape HTML content, which can leave your application vulnerable to these types of attacks. To mitigate this risk, it's recommended to use the html/template package instead, which provides built-in functionality for HTML escaping. By using html/template to render your HTML content, you can help to ensure that your web application is more secure and less susceptible to XSS vulnerabilities.

Ignore this finding from import-text-template.

@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from b10601a to 7b75e77 Compare November 27, 2023 20:28
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from d2dfe25 to ca9e5cd Compare November 27, 2023 20:29
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from 7b75e77 to 7cfdb2b Compare November 27, 2023 20:31
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 6e9ff00 to 5b45b09 Compare November 27, 2023 21:02
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from 7cfdb2b to c741a7b Compare November 27, 2023 21:02
@Spacesai1or Spacesai1or marked this pull request as draft November 27, 2023 21:32
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 5b45b09 to 1c5bc07 Compare November 27, 2023 22:29
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from c741a7b to 44c1bf2 Compare November 27, 2023 22:29
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2023

Important

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 1c5bc07 to 296a828 Compare November 27, 2023 22:40
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from 44c1bf2 to a86bc09 Compare November 27, 2023 22:40
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 296a828 to c0b5253 Compare November 27, 2023 22:44
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from a86bc09 to aa63240 Compare November 27, 2023 22:44
@Spacesai1or Spacesai1or marked this pull request as ready for review November 28, 2023 21:10
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from c0b5253 to b1a3dd0 Compare December 1, 2023 04:15
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from aa63240 to 7ba3ace Compare December 1, 2023 04:15
@semgrep-app
Copy link
Contributor

semgrep-app bot commented Dec 1, 2023

Semgrep found 6 sol-style-return-arg-fmt findings:

Named return arguments to functions must be appended with an underscore (_)

Ignore this finding from sol-style-return-arg-fmt.

Semgrep found 1 sol-style-input-arg-fmt finding:

  • packages/contracts-bedrock/scripts/Deployer.sol: L373

Inputs to functions must be prepended with an underscore (_)

Ignore this finding from sol-style-input-arg-fmt.

@Spacesai1or Spacesai1or marked this pull request as draft December 1, 2023 19:29
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from b1a3dd0 to 6901d27 Compare December 2, 2023 01:29
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from 7ba3ace to 5ad47f6 Compare December 2, 2023 01:30
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 6901d27 to 0239770 Compare December 2, 2023 02:20
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from 5ad47f6 to 34f2345 Compare December 2, 2023 02:20
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 9740072 to d01d2d0 Compare December 14, 2023 06:42
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from 78bd52c to d7ef0d2 Compare December 14, 2023 06:42
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from d01d2d0 to 6b0fd49 Compare December 14, 2023 06:47
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from d7ef0d2 to e156212 Compare December 14, 2023 06:47
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 6b0fd49 to 443ce2f Compare December 14, 2023 07:03
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from e156212 to eeb132d Compare December 14, 2023 07:03
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 443ce2f to 63c78f5 Compare December 14, 2023 07:11
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from eeb132d to cb17fd9 Compare December 14, 2023 07:11
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 63c78f5 to c09b84a Compare December 14, 2023 21:16
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from cb17fd9 to 7ce2bbb Compare December 14, 2023 21:16
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from c09b84a to 9bba7b9 Compare December 14, 2023 21:55
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from 7ce2bbb to f49bc2a Compare December 14, 2023 21:55
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 9bba7b9 to 44b836a Compare December 14, 2023 22:20
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from f49bc2a to dd5b1c6 Compare December 14, 2023 22:20
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from 44b836a to bc3062d Compare December 14, 2023 23:38
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from dd5b1c6 to afc6fc6 Compare December 14, 2023 23:38
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/bytecode-retrieval-mitigation branch from bc3062d to 81951e2 Compare December 15, 2023 19:46
@Spacesai1or Spacesai1or force-pushed the wyatt/bindgen/output-overwrite-warning branch from afc6fc6 to 48d47f6 Compare December 15, 2023 19:46
Base automatically changed from wyatt/bindgen/bytecode-retrieval-mitigation to develop December 16, 2023 03:12
@Spacesai1or Spacesai1or added this pull request to the merge queue Dec 16, 2023
Merged via the queue into develop with commit 8b39517 Dec 16, 2023
@Spacesai1or Spacesai1or deleted the wyatt/bindgen/output-overwrite-warning branch December 16, 2023 06:29
This was referenced Dec 17, 2023
roberto-bayardo pushed a commit to roberto-bayardo/optimism that referenced this pull request Dec 19, 2023
* Add deployed bytecode retrieval mitigation

* Bindings and metadata overwrite warning
roberto-bayardo pushed a commit to roberto-bayardo/optimism that referenced this pull request Dec 21, 2023
* Add deployed bytecode retrieval mitigation

* Bindings and metadata overwrite warning
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