summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 't/050CERT.t')
-rw-r--r--t/050CERT.t72
1 files changed, 72 insertions, 0 deletions
diff --git a/t/050CERT.t b/t/050CERT.t
new file mode 100644
index 000000000..902881152
--- /dev/null
+++ b/t/050CERT.t
@@ -0,0 +1,72 @@
+
+use 5.10.1;
+use strict;
+use warnings;
+use lib qw(. lib t);
+
+=pod
+
+This file tests for the settings recommended by CERT[1] as it's
+security related we run it all the time
+
+1: https://gist.github.com/briandfoy/4525877
+
+=cut
+
+use Test::More;
+
+# these tests are not optional
+use Test::Perl::Critic;
+
+Test::Perl::Critic->import(
+ -verbose => 8,
+ -severity => 3,
+ -theme => 'certrec || certrule || security',
+ -exclude => [
+ 'ProhibitAccessOfPrivateData', # false positives
+ 'ProhibitLeadingZeros', # needed for file permisions
+ 'RequireFilenameMatchesPackage', # Extensions fail this
+ 'ProhibitMagicNumbers', # Bollocks
+ 'ProhibitUnusedPrivateSubroutines', 'RequireEndWithOne', # extensions end with their name for some reason ....
+ 'ProhibitHashBarewords', # bollocks
+ 'ProhibitIndirectSyntax', # later
+ 'RequireCarping', # later
+ 'RequireUseWarnings', # later
+ 'ProhibitBuiltinHomonyms', # later
+ 'ProtectPrivateSubs', # later
+ 'ProtectPrivateVars', # later as search uses this deliberately ...
+ 'ProhibitCaptureWithoutTest', # later, doesn't recognise ThrowError
+ 'TestingAndDebugging::ProhibitNoWarnings', # tactically using no warning is the right way to do things
+ ]
+);
+
+Test::Perl::Critic::all_critic_ok(qw {
+ Bugzilla/BugMail.pm
+ extensions/ActivityReport
+ extensions/AgileTools
+ extensions/AntiSpam
+ extensions/AuthJWT
+ extensions/BayotBase
+ extensions/BugViewPlus
+ extensions/ComponentWatching
+ extensions/DependentProducts
+ extensions/EditTable
+ extensions/ExternalBugs
+ extensions/FontAwesome
+ extensions/InlineHistory
+ extensions/ListOfBugs
+ extensions/MultipleValues
+ extensions/ProductDashboard
+ extensions/Push
+ extensions/RedHat
+ extensions/Releases
+ extensions/RuleEngine
+ extensions/SAML2Auth
+ extensions/SecureMail
+ extensions/SelectizeJS
+ extensions/SubComponents
+ extensions/TreeViewPlus
+ extensions/Voting
+ extensions/Workflows
+ redhat
+ });