ethereum / nodemonitor

A little node monitoring utility
51 stars 26 forks source link

Support for authentication via headers #32

Closed holiman closed 1 year ago

holiman commented 1 year ago

This updates dependencies and adds the auth-headers. The dep updates was a bit tricky, and for some reason triggered

panic: proto: file "internal/internal.proto" is already registered
        previously from: "github.com/influxdata/influxql/internal"
        currently from:  "github.com/influxdata/influxdb/query/internal"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

It can be worked around by running/building like this:

[user@work nodemonitor]$ go run -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn"  .  ./test2.toml
WARNING: proto: file "internal/internal.proto" is already registered
        previously from: "github.com/influxdata/influxql/internal"
        currently from:  "github.com/influxdata/influxdb/query/internal"
See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

Not sure what the root problem is, probably some double-dependency on influx which conflicts.

gitguardian[bot] commented 1 year ago

⚠️ 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 | Secret | Commit | Filename | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [6388220](https://dashboard.gitguardian.com/incidents/6388220?occurrence=92362919) | Generic High Entropy Secret | 26b5dc45b0c0c75b52dd06ad61b87f05b8da7e10 | test.toml | [View secret](https://github.com/ethereum/nodemonitor/commit/26b5dc45b0c0c75b52dd06ad61b87f05b8da7e10#diff-5d7d9b9bcbe9fd0f983c5be4298dce9bd55e0e3b4123ed1cb8102df84eeaf1a0R37) |
🛠 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](https://blog.gitguardian.com/secrets-api-management) the best practices. 3. Revoke and [rotate this secret](https://docs.gitguardian.com/secrets-detection/detectors/specifics/private_key_openssh#revoke-the-secret). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet). 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 - following these [best practices](https://blog.gitguardian.com/secrets-api-management/) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/internal-repositories-monitoring/integrations/git_hooks/pre_commit) to catch secret before it leaves your machine and ease remediation. If this detection is a false positive, please contact Oleh Vasylenko (@aldekein) to fix it in the GitGuardian dashboard.

🦉 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.

Our GitHub checks need improvements? Share your feedbacks!

holiman commented 1 year ago

If this detection is a false positive, please contact Oleh Vasylenko (@Aldekein) to fix it in the GitGuardian dashboard.

Yep @Aldekein it's a false positive, the "secret" is intentional to show how to use it, and it's just gibberish.