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

refactor(e2e): use private key rather than mnemonic in admin tests #2350

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

gartnera
Copy link
Member

@gartnera gartnera commented Jun 19, 2024

Description

#2308 is getting a bit large, so I'm gonna start breaking stuff out of it.

  • use private key rather than pneumonic for fungible admin
  • remove fungible admin parameters from e2e instead provide an optional ZetaTxServer
  • only populate the ZetaTxServer when it's actually needed (admin tests)

Part of #2238

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Copy link

gitguardian bot commented Jun 19, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
11759679 Triggered Generic High Entropy Secret d416266 cmd/zetae2e/local/accounts.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@gartnera gartnera changed the title refactor(e2e): use private key rather than pnemonic admin tests refactor(e2e): use private key rather than pnemonic in admin tests Jun 19, 2024
Copy link

!!!WARNING!!!
nosec detected in the following files: cmd/zetae2e/local/accounts.go, e2e/e2etests/e2etests.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Jun 19, 2024
@gartnera gartnera added the no-changelog Skip changelog CI check label Jun 19, 2024
contrib/localnet/docker-compose-admin.yml Show resolved Hide resolved
e2e/e2etests/e2etests.go Outdated Show resolved Hide resolved
@gartnera gartnera marked this pull request as ready for review June 19, 2024 01:14
@lumtis lumtis changed the title refactor(e2e): use private key rather than pnemonic in admin tests refactor(e2e): use private key rather than mnemonic in admin tests Jun 19, 2024
@lumtis
Copy link
Member

lumtis commented Jun 19, 2024

I guess we can close #2308 ?

Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

LGTM

I think we can extend the functional option pattern for other options in the runner struct in the future

e2e/e2etests/e2etests.go Outdated Show resolved Hide resolved
@gartnera
Copy link
Member Author

I guess we can close #2308 ?

I still have 2-3 more PRs worth of changes I need to pull out of that PR.

@gartnera gartnera merged commit 3c4ea97 into develop Jun 19, 2024
18 of 19 checks passed
@gartnera gartnera deleted the refactor-e2e-secrets-1 branch June 19, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants