small-tech / should-i-pipe-it

Is this installation script safe to pipe into my shell?
GNU Affero General Public License v3.0
18 stars 1 forks source link

Add JSON endpoint #11

Open aral opened 4 years ago

aral commented 4 years ago

Use case

A commandline tool wants to integrate lookup/validation based on the hash of an actual downloaded script.

Suggested API

https://should-i-pipe.it/<Blake2b-512 hash>

Returns: JSON:

{
  "known": /* false | */ {
     "type": "verification" /* | "warning" */,
     // … other fields are the same as in the verified-hashes data structure.
  }
}

Note: warning objects have not been implemented yet. See discussion in last paragraph here.

Reference: verified-hashes.json