Skip to content

Commit 3b238c4

Browse files
(PE-42025) addressing rexml CVE (#607)
Merging with the ci test failures as they are known issues.
1 parent 618fb32 commit 3b238c4

File tree

6 files changed

+191
-46
lines changed

6 files changed

+191
-46
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ jobs:
1313
if: ${{ github.repository_owner == 'puppetlabs' }}
1414
needs: Spec
1515
uses: puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main
16-
with:
17-
flags: --provision-service
1816
secrets: inherit

.github/workflows/nightly.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ jobs:
1313
if: ${{ github.repository_owner == 'puppetlabs' }}
1414
needs: Spec
1515
uses: puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main
16-
with:
17-
flags: --provision-service
1816
secrets: inherit

.rubocop.yml

Lines changed: 180 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
---
2-
require:
3-
- rubocop-performance
4-
- rubocop-rspec
2+
plugins:
3+
- rubocop-performance
4+
- rubocop-rspec
5+
- rubocop-rspec_rails
6+
- rubocop-factory_bot
7+
- rubocop-capybara
58
AllCops:
69
Newcops: enable
710
ExtraDetails: true
811
DisplayStyleGuide: true
912
DisplayCopNames: true
1013
TargetRubyVersion: '2.7'
11-
Include:
12-
- "**/*.rb"
14+
Include: ['**/*.rb']
1315
Exclude:
14-
- bin/*
15-
- ".vendor/**/*"
16-
- "**/Gemfile"
17-
- "**/Rakefile"
18-
- pkg/**/*
19-
- spec/fixtures/**/*
20-
- vendor/**/*
21-
- "**/Puppetfile"
22-
- "**/Vagrantfile"
23-
- "**/Guardfile"
16+
- bin/*
17+
- .vendor/**/*
18+
- '**/Gemfile'
19+
- '**/Rakefile'
20+
- pkg/**/*
21+
- spec/fixtures/**/*
22+
- vendor/**/*
23+
- '**/Puppetfile'
24+
- '**/Vagrantfile'
25+
- '**/Guardfile'
2426
Layout/LineLength:
2527
Description: People have wide screens, use them.
2628
Max: 200
2729
RSpec/BeforeAfterAll:
2830
Description: Beware of using after(:all) as it may cause state to leak between tests.
2931
A necessary evil in acceptance testing.
30-
Exclude:
31-
- spec/acceptance/**/*.rb
32+
Exclude: [spec/acceptance/**/*.rb]
3233
RSpec/HookArgument:
3334
Description: Prefer explicit :each argument, matching existing module's style
3435
EnforcedStyle: each
3536
RSpec/DescribeSymbol:
36-
Exclude:
37-
- spec/unit/facter/**/*.rb
37+
Exclude: [spec/unit/facter/**/*.rb]
3838
Style/BlockDelimiters:
3939
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
4040
be consistent then.
@@ -77,9 +77,7 @@ Style/SymbolArray:
7777
RSpec/MessageSpies:
7878
EnforcedStyle: receive
7979
Style/Documentation:
80-
Exclude:
81-
- lib/puppet/parser/functions/**/*
82-
- spec/**/*
80+
Exclude: [lib/puppet/parser/functions/**/*, spec/**/*]
8381
Style/WordArray:
8482
EnforcedStyle: brackets
8583
Performance/AncestorsInclude:
@@ -296,7 +294,7 @@ Performance/UriDefaultParser:
296294
Enabled: false
297295
RSpec/Be:
298296
Enabled: false
299-
RSpec/Capybara/FeatureMethods:
297+
RSpec/Dialect:
300298
Enabled: false
301299
RSpec/ContainExactly:
302300
Enabled: false
@@ -318,15 +316,17 @@ RSpec/ExampleLength:
318316
Enabled: false
319317
RSpec/ExampleWithoutDescription:
320318
Enabled: false
319+
RSpec/ExampleWording:
320+
Enabled: false
321321
RSpec/ExpectChange:
322322
Enabled: false
323323
RSpec/ExpectInHook:
324324
Enabled: false
325-
RSpec/FactoryBot/AttributeDefinedStatically:
325+
FactoryBot/AttributeDefinedStatically:
326326
Enabled: false
327-
RSpec/FactoryBot/CreateList:
327+
FactoryBot/CreateList:
328328
Enabled: false
329-
RSpec/FactoryBot/FactoryClassName:
329+
FactoryBot/FactoryClassName:
330330
Enabled: false
331331
RSpec/HooksBeforeExamples:
332332
Enabled: false
@@ -464,6 +464,8 @@ Style/RedundantSelfAssignment:
464464
Enabled: false
465465
Style/RedundantSort:
466466
Enabled: false
467+
Style/RedundantReturn:
468+
Enabled: false
467469
Style/RescueStandardError:
468470
Enabled: false
469471
Style/SingleArgumentDig:
@@ -598,29 +600,31 @@ RSpec/ClassCheck:
598600
Enabled: false
599601
RSpec/DuplicatedMetadata:
600602
Enabled: false
603+
RSpec/MetadataStyle:
604+
Enabled: false
601605
RSpec/ExcessiveDocstringSpacing:
602606
Enabled: false
603-
RSpec/FactoryBot/ConsistentParenthesesStyle:
607+
FactoryBot/ConsistentParenthesesStyle:
604608
Enabled: false
605-
RSpec/FactoryBot/FactoryNameStyle:
609+
FactoryBot/FactoryNameStyle:
606610
Enabled: false
607-
RSpec/FactoryBot/SyntaxMethods:
611+
FactoryBot/SyntaxMethods:
608612
Enabled: false
609613
RSpec/IdenticalEqualityAssertion:
610614
Enabled: false
611615
RSpec/NoExpectationExample:
612616
Enabled: false
613617
RSpec/PendingWithoutReason:
614618
Enabled: false
615-
RSpec/Rails/AvoidSetupHook:
619+
RSpecRails/AvoidSetupHook:
616620
Enabled: false
617-
RSpec/Rails/HaveHttpStatus:
621+
RSpecRails/HaveHttpStatus:
618622
Enabled: false
619-
RSpec/Rails/InferredSpecType:
623+
RSpecRails/InferredSpecType:
620624
Enabled: false
621-
RSpec/Rails/MinitestAssertions:
625+
RSpecRails/MinitestAssertions:
622626
Enabled: false
623-
RSpec/Rails/TravelAround:
627+
RSpecRails/TravelAround:
624628
Enabled: false
625629
RSpec/RedundantAround:
626630
Enabled: false
@@ -724,3 +728,145 @@ Style/StringChars:
724728
Enabled: false
725729
Style/SwapValues:
726730
Enabled: false
731+
Gemspec/AddRuntimeDependency: # new in 1.65
732+
Enabled: false
733+
Gemspec/AttributeAssignment: # new in 1.77
734+
Enabled: false
735+
Layout/EmptyLinesAfterModuleInclusion: # new in 1.79
736+
Enabled: false
737+
Lint/ArrayLiteralInRegexp: # new in 1.71
738+
Enabled: false
739+
Lint/ConstantReassignment: # new in 1.70
740+
Enabled: false
741+
Lint/CopDirectiveSyntax: # new in 1.72
742+
Enabled: false
743+
Lint/DuplicateMatchPattern: # new in 1.50
744+
Enabled: false
745+
Lint/DuplicateSetElement: # new in 1.67
746+
Enabled: false
747+
Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
748+
Enabled: false
749+
Lint/ItWithoutArgumentsInBlock: # new in 1.59
750+
Enabled: false
751+
Lint/LiteralAssignmentInCondition: # new in 1.58
752+
Enabled: false
753+
Lint/MixedCaseRange: # new in 1.53
754+
Enabled: false
755+
Lint/NumericOperationWithConstantResult: # new in 1.69
756+
Enabled: false
757+
Lint/RedundantRegexpQuantifiers: # new in 1.53
758+
Enabled: false
759+
Lint/RedundantTypeConversion: # new in 1.72
760+
Enabled: false
761+
Lint/SharedMutableDefault: # new in 1.70
762+
Enabled: false
763+
Lint/SuppressedExceptionInNumberConversion: # new in 1.72
764+
Enabled: false
765+
Lint/UnescapedBracketInRegexp: # new in 1.68
766+
Enabled: false
767+
Lint/UselessConstantScoping: # new in 1.72
768+
Enabled: false
769+
Lint/UselessDefaultValueArgument: # new in 1.76
770+
Enabled: false
771+
Lint/UselessDefined: # new in 1.69
772+
Enabled: false
773+
Lint/UselessNumericOperation: # new in 1.66
774+
Enabled: false
775+
Lint/UselessOr: # new in 1.76
776+
Enabled: false
777+
Naming/PredicateMethod: # new in 1.76
778+
Enabled: false
779+
Style/AmbiguousEndlessMethodDefinition: # new in 1.68
780+
Enabled: false
781+
Style/BitwisePredicate: # new in 1.68
782+
Enabled: false
783+
Style/CollectionQuerying: # new in 1.77
784+
Enabled: false
785+
Style/CombinableDefined: # new in 1.68
786+
Enabled: false
787+
Style/ComparableBetween: # new in 1.74
788+
Enabled: false
789+
Style/DataInheritance: # new in 1.49
790+
Enabled: false
791+
Style/DigChain: # new in 1.69
792+
Enabled: false
793+
Style/EmptyStringInsideInterpolation: # new in 1.76
794+
Enabled: false
795+
Style/ExactRegexpMatch: # new in 1.51
796+
Enabled: false
797+
Style/FileNull: # new in 1.69
798+
Enabled: false
799+
Style/FileTouch: # new in 1.69
800+
Enabled: false
801+
Style/HashFetchChain: # new in 1.75
802+
Enabled: false
803+
Style/HashSlice: # new in 1.71
804+
Enabled: false
805+
Style/ItAssignment: # new in 1.70
806+
Enabled: false
807+
Style/ItBlockParameter: # new in 1.75
808+
Enabled: false
809+
Style/KeywordArgumentsMerging: # new in 1.68
810+
Enabled: false
811+
Style/MapIntoArray: # new in 1.63
812+
Enabled: false
813+
Style/RedundantArrayConstructor: # new in 1.52
814+
Enabled: false
815+
Style/RedundantArrayFlatten: # new in 1.76
816+
Enabled: false
817+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
818+
Enabled: false
819+
Style/RedundantFilterChain: # new in 1.52
820+
Enabled: false
821+
Style/RedundantFormat: # new in 1.72
822+
Enabled: false
823+
Style/RedundantInterpolationUnfreeze: # new in 1.66
824+
Enabled: false
825+
Style/RedundantLineContinuation: # new in 1.49
826+
Enabled: false
827+
Style/RedundantRegexpArgument: # new in 1.53
828+
Enabled: false
829+
Style/RedundantRegexpConstructor: # new in 1.52
830+
Enabled: false
831+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
832+
Enabled: false
833+
Style/SafeNavigationChainLength: # new in 1.68
834+
Enabled: false
835+
Style/SendWithLiteralMethodName: # new in 1.64
836+
Enabled: false
837+
Style/SingleLineDoEndBlock: # new in 1.57
838+
Enabled: false
839+
Style/SuperArguments: # new in 1.64
840+
Enabled: false
841+
Style/SuperWithArgsParentheses: # new in 1.58
842+
Enabled: false
843+
Style/YAMLFileRead: # new in 1.53
844+
Enabled: false
845+
Performance/MapMethodChain: # new in 1.19
846+
Enabled: false
847+
Performance/StringBytesize: # new in 1.23
848+
Enabled: false
849+
Performance/ZipWithoutBlock: # new in 1.24
850+
Enabled: false
851+
RSpec/IncludeExamples: # new in 3.6
852+
Enabled: false
853+
RSpecRails/NegationBeValid: # new in 2.23
854+
Enabled: false
855+
FactoryBot/AssociationStyle: # new in 2.23
856+
Enabled: false
857+
FactoryBot/ExcessiveCreateList: # new in 2.25
858+
Enabled: false
859+
FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
860+
Enabled: false
861+
FactoryBot/IdSequence: # new in 2.24
862+
Enabled: false
863+
FactoryBot/RedundantFactoryOption: # new in 2.23
864+
Enabled: false
865+
Capybara/FindAllFirst: # new in 2.22
866+
Enabled: false
867+
Capybara/NegationMatcherAfterVisit: # new in 2.22
868+
Enabled: false
869+
Capybara/RedundantWithinFind: # new in 2.20
870+
Enabled: false
871+
Capybara/RSpec/HaveSelector: # new in 2.19
872+
Enabled: false

Gemfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ group :development do
3131
gem "pry", '~> 0.10', require: false
3232
gem "simplecov-console", '~> 0.5', require: false
3333
gem "puppet-debugger", '~> 1.0', require: false
34-
gem "rubocop", '= 1.48.1', require: false
35-
gem "rubocop-performance", '= 1.16.0', require: false
36-
gem "rubocop-rspec", '= 2.19.0', require: false
34+
gem "rubocop", '= 1.79.0', require: false
35+
gem "rubocop-performance", '= 1.25.0', require: false
36+
gem "rubocop-rspec", '= 3.6.0', require: false
37+
gem "rubocop-rspec_rails", '~> 2.31.0', require: false
38+
gem "rubocop-factory_bot", '~> 2.27.1', require: false
39+
gem "rubocop-capybara", '~> 2.22.1', require: false
3740
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
38-
gem "bolt", '>= 3.27.2', require: false
41+
gem "bolt", '>= 4.0.0', require: false
3942
gem "github_changelog_generator", '1.16.4', require: false
4043
gem "octokit", '4.21.0', require: false
4144
gem "orchestrator_client", '< 0.7.1', require: false

spec/plans/subplans/install_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#########
2828
## <🤮>
29-
# rubocop:disable AnyInstance
29+
# rubocop:disable RSpec/AnyInstance
3030
allow(Tempfile).to receive(:new).and_call_original
3131
allow(Pathname).to receive(:new).and_call_original
3232
allow(Puppet::FileSystem).to receive(:exist?).and_call_original
@@ -40,7 +40,7 @@
4040
allow_any_instance_of(BoltSpec::Plans::MockExecutor).to receive(:module_file_id).with('/mock').and_return('/mock')
4141

4242
allow_upload('/mock')
43-
# rubocop:enable AnyInstance
43+
# rubocop:enable RSpec/AnyInstance
4444
## </🤮>
4545
##########
4646
end

spec/plans/util/retrieve_and_upload_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#########
1717
## <🤮>
18-
# rubocop:disable AnyInstance
18+
# rubocop:disable RSpec/AnyInstance
1919
allow(Pathname).to receive(:new).and_call_original
2020
allow(Puppet::FileSystem).to receive(:exist?).and_call_original
2121
allow_any_instance_of(BoltSpec::Plans::MockExecutor).to receive(:module_file_id).and_call_original
@@ -36,7 +36,7 @@
3636
Bolt::ResultSet.new(results)
3737
end
3838

39-
# rubocop:enable AnyInstance
39+
# rubocop:enable RSpec/AnyInstance
4040
## </🤮>
4141
##########
4242

0 commit comments

Comments
 (0)