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

[8.x](backport #5745) Diagnostics file writes use RedactSecretPaths #5798

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 15, 2024

What does this PR do?

The elastic-agent will use redact secret paths in files written in diagnostics bundles. Secret paths are expected to be specified as a top-level attribute in yaml data being written.

Why is it important?

Secrets that the fleet-server injects into policies can appear in diagnostics bundles.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

Secrets in diagnostics bundles will be redacted, as our public documentation discloses.

How to test this PR locally

Enrol in a fleet policy with secrets and collect a diagnostics bundle.


This is an automatic backport of pull request #5745 done by Mergify.

* Diagnostics file writes use RedactSecretPaths

* Add integration test

* Change to yaml.v3 in integration tests

* revert update to yaml.v3 across other testing files

(cherry picked from commit 1f3ade3)
@mergify mergify bot requested a review from a team as a code owner October 15, 2024 20:21
@mergify mergify bot added the backport label Oct 15, 2024
@mergify mergify bot requested review from blakerouse and pchila and removed request for a team October 15, 2024 20:21
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Oct 15, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube

@michel-laterman
Copy link
Contributor

@ycombinator I think this one will need to be manually forced

@pierrehilbert pierrehilbert merged commit ad249ed into 8.x Oct 16, 2024
15 of 16 checks passed
@pierrehilbert pierrehilbert deleted the mergify/bp/8.x/pr-5745 branch October 16, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants