porter
porter copied to clipboard
Sub-properties of sensitive object parameter not tracked as sensitive
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 https://github.com/getporter/porter/pull/3225.
See https://github.com/getporter/porter/pull/3225#discussion_r1781320135 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)