cannon: use constant instead of magic value for solidity part
ref: https://github.com/ethereum-optimism/optimism/pull/12484 This is a follow-up PR for https://github.com/ethereum-optimism/optimism/pull/12386 one, which does the same to the solidity part.
Semgrep found 3 golang_fmt_errorf_no_params findings:
- op-chain-ops/deployer/state/intent.go
- op-chain-ops/deployer/bootstrap/bootstrap.go
No fmt.Errorf invocations without fmt arguments allowed
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 64.86%. Comparing base (
1e59d08) to head (a84a2e4). Report is 62 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #12486 +/- ##
===========================================
- Coverage 65.04% 64.86% -0.18%
===========================================
Files 54 54
Lines 4460 4460
===========================================
- Hits 2901 2893 -8
- Misses 1382 1391 +9
+ Partials 177 176 -1
| Flag | Coverage Δ | |
|---|---|---|
| cannon-go-tests | 64.86% <ø> (-0.18%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Semgrep found 1 golang_fmt_errorf_no_params finding:
No fmt.Errorf invocations without fmt arguments allowed
Semgrep found 6 sol-style-input-arg-fmt findings:
- packages/contracts-bedrock/src/L2/interfaces/ISuperchainWETH.sol
Inputs to functions must be prepended with an underscore (_)
Semgrep found 1 math-random-used finding:
Do not use math/rand. Use crypto/rand instead.
Semgrep found 1 marshal-json-pointer-receiver finding:
MarshalJSON with a pointer receiver has surprising results: https://github.com/golang/go/issues/22967
Ignore this finding from marshal-json-pointer-receiver.Semgrep found 1 err-nil-check finding:
superfluous nil err check before return
Ignore this finding from err-nil-check.
Semgrep found 1 sol-style-require-reason finding:
require() must include a reason string
Ignore this finding from sol-style-require-reason.Semgrep found 5 sol-style-input-arg-fmt findings:
- packages/contracts-bedrock/src/L2/SuperchainWETH.sol
Inputs to functions must be prepended with an underscore (_)
Semgrep found 1 no-direct-write-to-responsewriter finding:
Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'.
Ignore this finding from no-direct-write-to-responsewriter.Semgrep found 1 no-direct-write-to-responsewriter-taint finding:
Untrusted input could be used to tamper with a web page rendering, which can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. For more information, see: Go XSS prevention.
View Dataflow Graph
flowchart LR
classDef invis fill:white, stroke: none
classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none
subgraph File0["<b>op-challenger/game/fault/trace/prestates/multi_test.go</b>"]
direction LR
%% Source
subgraph Source
direction LR
v0["<a href=https://github.com/ethereum-optimism/optimism/blob/2ab49867cbd71c2eee68fd81d7070a1930a1a97f/op-challenger/game/fault/trace/prestates/multi_test.go#L194 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 194] r.URL</a>"]
end
%% Intermediate
%% Sink
subgraph Sink
direction LR
v1["<a href=https://github.com/ethereum-optimism/optimism/blob/2ab49867cbd71c2eee68fd81d7070a1930a1a97f/op-challenger/game/fault/trace/prestates/multi_test.go#L194 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 194] w.Write([]byte(r.URL.Path))</a>"]
end
end
%% Class Assignment
Source:::invis
Sink:::invis
File0:::invis
%% Connections
Source --> Sink