Skip to content

Commit 17d94bc

Browse files
authored
Merge pull request #32 from dev-sec/ap/bump-version-2.3.0
Bump version to 2.3.0 and switch to inspec 3 for check
2 parents a23b568 + 53eac76 commit 17d94bc

File tree

8 files changed

+43
-30
lines changed

8 files changed

+43
-30
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
**/.tmp
44
Gemfile.lock
55
Berksfile.lock
6+
inspec.lock
67
nbproject

.rubocop.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
AllCops:
33
Exclude:
44
- vendor/**/*
5-
- "*/puppet/Puppetfile"
6-
- "*/puppet/.tmp/**/*"
7-
TargetRubyVersion: 1.9
85
Documentation:
96
Enabled: false
107
AlignParameters:

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change Log
22

3+
## [2.3.0](https://github.com/dev-sec/nginx-baseline/tree/2.3.0) (2019-05-14)
4+
[Full Changelog](https://github.com/dev-sec/nginx-baseline/compare/2.2.0...2.3.0)
5+
6+
**Merged pull requests:**
7+
8+
- Templates [\#30](https://github.com/dev-sec/nginx-baseline/pull/30) ([rndmh3ro](https://github.com/rndmh3ro))
9+
- remove test for hardening.conf file [\#28](https://github.com/dev-sec/nginx-baseline/pull/28) ([rndmh3ro](https://github.com/rndmh3ro))
10+
- use parse\_config instead of parse\_config\_file [\#27](https://github.com/dev-sec/nginx-baseline/pull/27) ([rndmh3ro](https://github.com/rndmh3ro))
11+
- Make nginx-14 and nginx-16 disabled by default based on dev-sec/nginx-baseline\#21 [\#26](https://github.com/dev-sec/nginx-baseline/pull/26) ([woneill](https://github.com/woneill))
12+
313
## [2.2.0](https://github.com/dev-sec/nginx-baseline/tree/2.2.0) (2018-06-26)
414
[Full Changelog](https://github.com/dev-sec/nginx-baseline/compare/2.1.0...2.2.0)
515

Gemfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

3-
gem 'highline', '~> 1.6.0'
4-
gem 'inspec', '~> 1'
5-
gem 'rack', '1.6.4'
6-
gem 'rake'
7-
gem 'rubocop', '~> 0.46.0'
5+
gem 'highline', '~> 2.0.2'
6+
gem 'inspec', '~> 3'
7+
gem 'rack', '~> 2.0.7'
8+
gem 'rake', '~> 12.3.2'
9+
gem 'rubocop', '~> 0.68.1'
810

911
group :tools do
10-
gem 'github_changelog_generator', '~> 1.12.0'
12+
gem 'github_changelog_generator', '~> 1.14.3'
13+
gem 'pry-coolline', '~> 0.2.5'
1114
end

Rakefile

100644100755
Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env rake
2-
# encoding: utf-8
32

43
require 'rake/testtask'
54
require 'rubocop/rake_task'
@@ -20,23 +19,30 @@ task default: [:lint, 'test:check']
2019
namespace :test do
2120
# run inspec check to verify that the profile is properly configured
2221
task :check do
23-
dir = File.join(File.dirname(__FILE__))
24-
sh("bundle exec inspec check #{dir}")
22+
require 'inspec'
23+
puts "Checking profile with InSpec Version: #{Inspec::VERSION}"
24+
profile = Inspec::Profile.for_target('.', backend: Inspec::Backend.create(Inspec::Config.mock))
25+
pp profile.check
2526
end
2627
end
2728

28-
# Automatically generate a changelog for this project. Only loaded if
29-
# the necessary gem is installed. By default its picking up the version from
30-
# inspec.yml. You can override that behavior with s`rake changelog to=1.2.0`
31-
begin
32-
require 'yaml'
33-
metadata = YAML.load_file('inspec.yml')
34-
v = ENV['to'] || metadata['version']
35-
puts "Generate changelog for version #{v}"
36-
require 'github_changelog_generator/task'
37-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
38-
config.future_release = v
29+
task :changelog do
30+
# Automatically generate a changelog for this project. Only loaded if
31+
# the necessary gem is installed. By default its picking up the version from
32+
# inspec.yml. You can override that behavior with `rake changelog to=1.2.0`
33+
begin
34+
require 'yaml'
35+
metadata = YAML.load_file('inspec.yml')
36+
v = ENV['to'] || metadata['version']
37+
puts " * Generating changelog for version #{v}"
38+
require 'github_changelog_generator/task'
39+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
40+
config.future_release = v
41+
config.user = 'dev-sec'
42+
config.project = 'nginx-baseline'
43+
end
44+
Rake::Task[:changelog].execute
45+
rescue LoadError
46+
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
3947
end
40-
rescue LoadError
41-
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
4248
end

controls/nginx_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# encoding: utf-8
2-
#
31
# Copyright 2015, Patrick Muench
42
#
53
# Licensed under the Apache License, Version 2.0 (the "License");

inspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ copyright: DevSec Hardening Framework Team
55
copyright_email: hello@dev-sec.io
66
license: Apache-2.0
77
summary: Test-suite for best-practice nginx hardening
8-
version: 2.2.0
8+
version: 2.3.0
99
supports:
1010
- os-family: unix

libraries/nginx_lib.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# encoding: utf-8
2-
#
31
# Copyright 2016, Patrick Muench
42
#
53
# Licensed under the Apache License, Version 2.0 (the "License");

0 commit comments

Comments
 (0)