Skip to content

Commit

Permalink
Fix security issue refs #4
Browse files Browse the repository at this point in the history
* Update version to 1.0.5
* Update to use yaml.safe_load()
* Update to tomoh1r
  • Loading branch information
tomoh1r committed Sep 13, 2017
1 parent 1ae50a3 commit 6e37c1c
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 24 deletions.
21 changes: 16 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
---
language: python
sudo: false
cache:
directories:
- $HOME/.cache/pip
python:
- 2.7
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
env:
matrix:
- TOXENV=py27
- TOXENV=py27-ansible2
- ANSIBLE_VER=1
- ANSIBLE_VER=2
install:
- pip install tox
script: tox
- python -m pip install -U setuptools pip
- [ $ANSIBLE_VER -eq 1 ] && python -m pip install -U 'ansible<2.0.0'
- [ $ANSIBLE_VER -eq 2 ] && python -m pip install -U 'ansible>2.0.0'
- python setup.py setup_test
script:
- python -m pytest

# vim:st=2 sts=2 sw=2:
10 changes: 10 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
1.0.5 (2017/09/13)

* Update to use yaml.safe_load()$
* Update to tomoh1r$

1.0.4 (2015/11/29)

* Apply to Ansible 2
* Add unit tests

1.0.3 (2015/05/18)

* fix README.rst typo
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
ansible-vault
=============

.. image:: https://travis-ci.org/jptomo/ansible-vault.svg?branch=master
:target: https://travis-ci.org/jptomo/ansible-vault
.. image:: https://travis-ci.org/tomoh1r/ansible-vault.svg?branch=master
:target: https://travis-ci.org/tomoh1r/ansible-vault

This project aim to R/W an ansible-vault yaml file

Expand Down
2 changes: 1 addition & 1 deletion ansible_vault/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, password):

def load(self, stream):
'''read vault steam and return python object'''
return yaml.load(self.vault.decrypt(stream))
return yaml.safe_load(self.vault.decrypt(stream))

def dump(self, data, stream=None):
'''encrypt data and print stdout or write to stream'''
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[metadata]
description-file = README.rst

[pytest]
testpaths = ansible_vault/test
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def run_tests(self):

setup(
name='ansible-vault',
version='1.0.4',
version='1.0.5',
author='Tomohiro NAKAMURA',
author_email='[email protected]',
url='https://github.com/jptomo/ansible-vault',
url='https://github.com/tomoh1r/ansible-vault',
description='R/W an ansible-vault yaml file',
long_description=_read('README.rst'),
packages=find_packages(),
Expand Down
14 changes: 0 additions & 14 deletions tox.ini

This file was deleted.

0 comments on commit 6e37c1c

Please sign in to comment.