Skip to content

Output files to host when using Docker#1307

Merged
drwetter merged 2 commits intotestssl:3.0from
petegallagher:patch-1
Sep 13, 2019
Merged

Output files to host when using Docker#1307
drwetter merged 2 commits intotestssl:3.0from
petegallagher:patch-1

Conversation

@petegallagher
Copy link
Copy Markdown
Contributor

Provides an example of how to create output files in the host filesystem when using Docker.

Provides an example of how to create output files in the host filesystem when using Docker.
@drwetter
Copy link
Copy Markdown
Collaborator

Hi @petegallagher ,

that is an important hint, thanks!

Could add 1-2 points though or do you want me to do that?

  1. it should work with copy & paste or using place holders to explain what it is doing.
  2. pwd works but I am preaching in the coding style guide it's deprecated. Pls use $PWD

Cheers, Dirk

@petegallagher
Copy link
Copy Markdown
Contributor Author

Hi @drwetter

  1. The command already works with copy/paste and I provided and explanation of what is happening in the sentence prior to the example. So I'm not sure what else you require here?
  2. I have updated the command according to your style preferences.

Thanks,

Peter

@drwetter
Copy link
Copy Markdown
Collaborator

Hi Peter,

thanks for the update.

You assume the container user is allowed to write into $PWD which only works with very loose (e.g. 777) permissions [1]:

prompt:/data/tmp/d|2% ls -la                                                                                                                                         
total 16
drwxrwxrwx 2 me root   94 Aug 29 11:37 .
drwxr-xr-x 4 root  root  100 Aug 29 11:33 ..
-rw-r--r-- 1  1000 1000 6072 Aug 29 11:38 -example.com_p443-20190829-0935.html
-rw-r--r-- 1  1000 1000 4747 Aug 29 11:38 -example.com_p443-20190829-0937.html
prompt:/data/tmp/d|% 

Without any further comment people will stumble over this. So at least the should get a hint. OTOH I do not want people to recommend to set any directory to 777 so that they can do the docker mount, as this is security-wise a bad recommendation. So either the suggested commandline needs to be amended or a big warning needs to be there when saying it only works with 777.

I don't know what's the best is, let me sleep over it. Opinions?

Cheers, Dirk

[1]: It might work by coincidence if the local user and the container UID match.

PS: Why not picking --htmlfile instead of --html --outprefix?

@drwetter drwetter added this to the 3.0 milestone Sep 13, 2019
@drwetter drwetter merged commit e4e3df5 into testssl:3.0 Sep 13, 2019
@drwetter drwetter mentioned this pull request Sep 13, 2019
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

Successfully merging this pull request may close these issues.

2 participants