Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: 1.04 -> Failed conversion of access_key_1_last_rotated using format #103

Closed
jonatversprite opened this issue Sep 11, 2017 · 7 comments

Comments

@jonatversprite
Copy link

Let me know what other logs would help. Here's a copy of the console output.

$ date
Mon Sep 11 10:59:05 EDT 2017
$ git clone https://github.com/Alfresco/prowler.git
Cloning into 'prowler'...
remote: Counting objects: 534, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 534 (delta 2), reused 3 (delta 1), pack-reused 527
Receiving objects: 100% (534/534), 217.04 KiB | 0 bytes/s, done.
Resolving deltas: 100% (275/275), done.
$ ./prowler -n -p $PROFILE -M csv > ~/Desktop/prowler/$PROFILE_prowler.csv

Generating "," delimited report on stdout for profile CardL_IDS, account $ACCOUNT_#
0.0 Show report generation info
...
1.04 Ensure access keys are rotated every 90 days or less (Scored)
Failed conversion of access_key_1_last_rotated'' using format %Y-%m-%d''
date: illegal time format
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
./prowler: line 193: (1505141313 - )/60/60/24: syntax error: operand expected (error token is ")/60/60/24")
./prowler: line 519: [: -gt: unary operator expected
1.05 Ensure IAM password policy requires at least one uppercase letter (Scored)
...11

@toniblyx
Copy link
Member

Are you running it on linux or mac?
It seems to be using a wrong flag on the date command. The numbers enhancement is working fine, isn't it?

@jonatversprite
Copy link
Author

$ uname -a
Darwin Jonathans-MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

@jonatversprite
Copy link
Author

I tested on an Amazon Linux box:

1.04 Ensure access keys are rotated every 90 days or less (Scored)
date: invalid date ‘access_key_1_last_rotated’
./prowler: line 170: (1505088000 - )/60/60/24: syntax error: operand expected (error token is ")/60/60/24")
./prowler: line 519: [: -gt: unary operator expected

@toniblyx
Copy link
Member

ok, thanks. Working on it now

@toniblyx
Copy link
Member

toniblyx commented Sep 11, 2017

I can't reproduce it using either commands:

./prowler -p $PROFILE -n -c check104 -M csv

or

./prowler -p $PROFILE -n -c check104

Can you try changing line 519 from this:

if [ $HOWOLDER -gt "90" ];then

to this one:

if [[ $HOWOLDER -gt "90" ]];then

Thanks.

@jonatversprite
Copy link
Author

change made, here's the output

date: invalid date ‘access_key_1_last_rotated’
./prowler: line 170: (1505088000 - )/60/60/24: syntax error: operand expected (error token is ")/60/60/24")

toniblyx added a commit that referenced this issue Sep 11, 2017
@toniblyx
Copy link
Member

There was a conflict with certain user names ;) and now it is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants