Skip to content

Commit

Permalink
Merge pull request #1886 from beechtom/bug/unknown-plan-param
Browse files Browse the repository at this point in the history
Do not check if unrecognized plan parameters are sensitive
  • Loading branch information
lucywyman committed Jun 9, 2020
2 parents 0d44ce7 + 35c8092 commit 4487641
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bolt-modules/boltlib/lib/puppet/functions/run_plan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ def wrap_sensitive_parameters(params, param_models)
params.each_with_object({}) do |(name, value), acc|
model = models[name]

if sensitive_type?(model.type_expr)
# Parameters passed to a plan that the plan is not expecting don't have a model,
# so keep the parameter as-is.
if model.nil?
acc[name] = value
elsif sensitive_type?(model.type_expr)
acc[name] = Puppet::Pops::Types::PSensitiveType::Sensitive.new(value)
else
if model.type_expr.to_s.include?('Sensitive')
Expand Down

0 comments on commit 4487641

Please sign in to comment.