[WIP] Ask confirmation for running untrusted resources

Here is a proposal to the issue #32.
The objective, is to avoid the execution of untrusted scripts

* [ ] Add tests
* [ ] Document it
* [ ] Remember trusted signatures
* [ ] Trust users

```bash
$ ./bin/melody run ~/test.php  -vvv
Hello Melody!

$ ./bin/melody run 23bb3980daf65154c3d4 
You are running an untrusted resource
  URL: https://gist.github.com/23bb3980daf65154c3d4
  Owner: lyrixx
  Created at: Fri, 17 Oct 2014 14:44:13 +0000
  Last update: Fri, 17 Oct 2014 23:45:48 +0000
  Revision: #2
  Trust signature: 9d9f9ba5a46b75d1117709a621f5860ea46c6b1979c176cddad072ccde0a1482
Do you want to continue [y/N]?y
----------------------------------
Hello greg
----------------------------------

$ ./bin/melody run 23bb3980daf65154c3d4 --trust-all
----------------------------------
Hello greg
----------------------------------

$ ./bin/melody run 23bb3980daf65154c3d4 --trust-only 9d9f9ba5a46b75d1117709a621f5860ea46c6b1979c176cddad072ccde0a1482
----------------------------------
Hello greg
----------------------------------
```
Every hash can collide but how can the "hacker" know you trusted this
specific script?
Le vendredi 12 décembre 2014, Christian Flothmann <notifications@github.com>
a écrit :

> In src/SensioLabs/Melody/Console/Command/RunCommand.php
> <https://github.com/sensiolabs/melody/pull/33#discussion-diff-21751626>:
>
> >
> >          $script = $input->getArgument('script');
> >          $arguments = $input->getArgument('arguments');
> >
> > -        $melody->run($script, $arguments, $configuration, $cliExecutor);
> > +        while (true) {
>
> What about something like this?
>
> do {    try {        $melody->run($script, $arguments, $configuration, $cliExecutor);        return 0;    } catch (TrustException $e) {        if (false === $confirmedTrust = $this->confirmTrust($e->getResource(), $input, $output)) {            $output->writeln('<error>Operation aborted by the user.</error>');            return 1;        }        $configuration->addTrustedSignature($e->getResource()->getMetadata()->getSignature());    }} while ($confirmedTrust);
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/sensiolabs/melody/pull/33/files#r21751626>.
>


-- 

------------------------------

Cordialement, *PunKeel*'.