Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

kubeaudit autofix: triple dash issue in multiline string #582

Open
1 of 2 tasks
til69 opened this issue Apr 15, 2024 · 1 comment
Open
1 of 2 tasks

kubeaudit autofix: triple dash issue in multiline string #582

til69 opened this issue Apr 15, 2024 · 1 comment

Comments

@til69
Copy link

til69 commented Apr 15, 2024

ISSUE TYPE
  • Bug Report
  • Feature Idea

BUG REPORT

SUMMARY

--- gets mis-interpreted and is an issue at least in the first occurring multiline string

ENVIRONMENT
  • Kubeaudit version: 0.22.1
  • Kubeaudit install method: Binary
STEPS TO REPRODUCE

manifest.yaml

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: multiline-issue
data:
  k1: |
    ---
    This gets messed up
  k2: |
    --
    This is fine
  k3: |
    -----BEGIN CERTIFICATE-----
    It's an issue in certificates, too...
    -----END CERTIFICATE-----
kubeaudit autofix -f manifest.yaml -o out.yaml
EXPECTED RESULTS

out.yaml

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: multiline-issue
data:
  k1: |
    ---
    This gets messed up
  k2: |
    --
    This is fine
  k3: |
    -----BEGIN CERTIFICATE-----
    It's an issue in certificates, too...
    -----END CERTIFICATE-----
ACTUAL RESULTS

out.yaml

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: multiline-issue
data:
  k1: ""

    ---
    This gets messed up
  k2: |
    --
    This is fine
  k3: |
    -----BEGIN CERTIFICATE-----
    It's an issue in certificates, too...
    -----END CERTIFICATE-----
Copy link

Thanks for opening your first issue here! Be sure to follow the issue template!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant