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

Sub-properties of sensitive object parameter not tracked as sensitive #3227

Open
lbergnehr opened this issue Oct 1, 2024 · 0 comments
Open
Labels
bug Oops, sorry!

Comments

@lbergnehr
Copy link
Contributor

Describe the bug

When using sub-properties of a sensitive parameter of object type, they are not tracked as sensitive by Porter, even if the parameter itself is sensitive. This is an effect of the implementation of the sub-properties functionality in templating done in #3225.

See #3225 (comment) for more context and the development of the sub-properties feature.

To Reproduce

Steps to reproduce the behavior:

Given this manifest:

---
name: test
schemaVersion: 1.0.1
version: 1.0.0

registry: localhost:5000

parameters:
  - name: sensitiveObject
    type: object
    sensitive: true
    default:
      subfield: this_is_secret

mixins:
  - exec

install:
  - exec:
      command: printf
      arguments:
        - '%s\n%s'
        - 'Sensitive object: ${ bundle.parameters.sensitiveObject }'
        - 'Sensitive subfield: ${ bundle.parameters.sensitiveObject.subfield }'

uninstall:
  - exec:
      command: echo

Run porter install on it, will produce something like this:

executing install action from test (installation: /test)
Sensitive object: *******
Sensitive subfield: this_is_secret
execution completed successfully!

Expected behavior

The value of Sensitive subfield, this_is_secret, should be masked like the value of Sensitive object.

Version

porter v1.1.0-33-g7630bc37 (7630bc37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Oops, sorry!
Projects
None yet
Development

No branches or pull requests

1 participant