Skip to content

Commit

Permalink
Merge pull request #248 from cesar-rodriguez/bugfix/dependency
Browse files Browse the repository at this point in the history
Bugfix/dependency
  • Loading branch information
Cesar Rodriguez authored Jun 20, 2020
2 parents 465dfb4 + 1969958 commit e161e8f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
History
=======

Unreleased
0.2.1
-----------
* Update pytest from 5.3.2 to 5.3.3
* Bugfix: The pyhcl hard dependency in the requirements.txt file caused issues if a higher version was installed. This was fixed by using the ">=" operator.

0.2.0 (2020-01-11)
-------------------
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Security and best practices test for terraform
Copyright (C) 2017 Cesar Rodriguez
Copyright (C) 2020 Accurics, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyhcl==0.4.4
pyhcl>=0.4.4
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.0
current_version = 0.2.1
commit = True
tag = True

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@
history = history_file.read()

requirements = [
'pyhcl==0.4.0',
'pyhcl>=0.4.4',
]

setup(
name='terrascan',
version='0.2.0',
version='0.2.1',
description="Best practices tests for terraform",
long_description=readme,
author="Cesar Rodriguez",
author_email='therasec@gmail.com',
url='https://github.com/cesar-rodriguez/terrascan',
download_url='https://github.com/cesar-rodriguez/terrascan' +
'/archive/v0.2.0.tar.gz',
'/archive/v0.2.1.tar.gz',
packages=find_packages(where='.'),
entry_points={
'console_scripts': [
Expand Down
16 changes: 8 additions & 8 deletions terrascan/terrascan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
terrascan: A collection of security and best practice tests for static code analysis of terraform templates using terraform_validate.
Copyright (C) 2017 Cesar Rodriguez
Copyright (C) 2020 Accurics, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -65,7 +65,7 @@
# should_contain_valid_json(): fails if the value of the property doesn't contain valid json.
###############################################################################################################################################################################
class Rules(unittest.TestCase):

rules = []

def setUp(self):
Expand Down Expand Up @@ -901,10 +901,10 @@ def terrascan(args):
startIndex += len(versionStr)
endIndex = stdout.find("\r", startIndex)
version = stdout[startIndex:endIndex]

# process the arguments
if args.warranty or args.gpl:
print("terrascan Copyright (C) 2020 Cesar Rodriguez\n")
print("terrascan Copyright (C) 2020 Accurics, Inc.\n")
if args.warranty:
print("This program is distributed in the hope that it will be useful,")
print("but WITHOUT ANY WARRANTY; without even the implied warranty of")
Expand Down Expand Up @@ -962,7 +962,7 @@ def terrascan(args):
config = args.config[0]
else:
config = None

# set logging based on logging.config if present (default is error)
if config == "none":
logging.basicConfig(level=logging.CRITICAL)
Expand Down Expand Up @@ -1113,13 +1113,13 @@ def main(args=None):
"""
parser = create_parser()
args = parser.parse_args(args)

#tests = args.tests[0]
#location = path.abspath(args.location[0])

#if not path.exists(location):
#print("ERROR: The specified location doesn't exists")
#exit(1)

#exit(run_test(location, tests))
terrascan(args)

0 comments on commit e161e8f

Please sign in to comment.