Skip to content

op-devstack: use file-based sequencer key loading for kona#18528

Closed
DenseDenise wants to merge 1 commit intoethereum-optimism:developfrom
DenseDenise:todoHelp
Closed

op-devstack: use file-based sequencer key loading for kona#18528
DenseDenise wants to merge 1 commit intoethereum-optimism:developfrom
DenseDenise:todoHelp

Conversation

@DenseDenise
Copy link
Contributor

kona now supports loading sequencer keys from files (op-rs/kona#2871), switched from KONA_NODE_P2P_SEQUENCER_KEY to KONA_NODE_P2P_SEQUENCER_KEY_PATH to match the pattern used for regular p2p keys

@DenseDenise DenseDenise requested review from a team as code owners December 6, 2025 10:42
@wiz-inc-a178a98b5d
Copy link

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Medium
Total 1 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

//p.Require().NoError(err, os.WriteFile(tempSeqKeyPath, []byte(p2pKeyHex), 0o644))
// Write sequencer key to file (supported since kona PR #2871)
tempSeqKeyPath := filepath.Join(tempKonaDir, "p2p-sequencer.txt")
p.Require().NoError(os.WriteFile(tempSeqKeyPath, []byte(p2pKeyHex), 0o644))
Copy link
Contributor

Choose a reason for hiding this comment

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

Low Severity severity

Access Control: Insecure file permissions for sequencer P2P key in WriteFile

The sequencer P2P private key is written to a file with 0o644 permissions (world-readable), while other sensitive keys in the codebase (JWT secrets, P2P node keys) are correctly written with 0o600 permissions (owner read/write only). This exposes the sequencer's private key to any user on the system who can read the temp directory.

Change the file permissions from 0o644 to 0o600 to match the security pattern used elsewhere in the codebase (e.g., op_rbuilder.go:163, orchestrator.go:136).

Suggested change
p.Require().NoError(os.WriteFile(tempSeqKeyPath, []byte(p2pKeyHex), 0o644))
p.Require().NoError(os.WriteFile(tempSeqKeyPath, []byte(p2pKeyHex), 0o600))

Don't like this finding? Reply "dismiss" and it won't appear again in future scans.

If it's acknowledged or addressed, reply "resolve" to mark it resolved.

@opgitgovernance opgitgovernance added the S-stale Status: Will be closed unless there is activity label Dec 20, 2025
@opgitgovernance
Copy link
Contributor

This pr has been automatically marked as stale and will be closed in 5 days if no updates

@DenseDenise
Copy link
Contributor Author

@bitwiseguy @ajsutton @Inphi Hi guys, mind checking this? has been hold for a while. thanks!

Copy link
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@Inphi
Copy link
Contributor

Inphi commented Dec 21, 2025

/ci authorize ff08204

@DenseDenise
Copy link
Contributor Author

CI looks good! cc @Inphi

@Inphi Inphi enabled auto-merge December 23, 2025 08:06
auto-merge was automatically disabled January 11, 2026 16:45

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-stale Status: Will be closed unless there is activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants