Skip to content

Commit

Permalink
Adopt the Mozilla Public License 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ALCC01 committed Jul 22, 2018
1 parent 130deb7 commit 09c984d
Show file tree
Hide file tree
Showing 23 changed files with 522 additions and 8 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ authors = ["Alberto Coscia <[email protected]>"]
description = "A password manager for the sneakernet"
repository = "https://github.com/ALCC01/sigil"
readme = "README.md"
license = "MPL-2.0"

[dependencies]
structopt = "0.2"
Expand Down
373 changes: 373 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sigil [![Build Status][travis-badge]][travis]
# Sigil
*A password manager for the [sneakernet][sneakernet-ud]*.

Sigil is a secure, [PGP][pgp]-backed password manager for your command line. It
Expand All @@ -19,12 +19,15 @@ chances with [Dropbox][dropbox-rice] or Google Drive) and have your secrets
sync throughout your devices, all with ease of mind that they are safe. As a
rule of thumb, wherever a file will go, so will your vault.

- [Sigil [![Build Status][travis-badge]][travis]](#sigil-build-statustravis-badgetravis)
[![Build Status][travis-badge]][travis]
## Table of Contents
- [Sigil](#sigil)
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Why's](#whys)
- [Why PGP?](#why-pgp)
- [Why not any other cloud-based, hassle-free password manager?](#why-not-any-other-cloud-based-hassle-free-password-manager)
- [Why not [`pass`][pass]?](#why-not-passpass)
- [Why not `pass`?](#why-not-pass)
- [Why OTPs on a PC?](#why-otps-on-a-pc)
- [Getting started](#getting-started)
- [Creating a vault](#creating-a-vault)
Expand All @@ -36,6 +39,7 @@ rule of thumb, wherever a file will go, so will your vault.
- [Retrieving an OTP token](#retrieving-an-otp-token)
- [Importing an OTP token from `otpauth://` URLs](#importing-an-otp-token-from-otpauth-urls)
- [Removing an OTP generator](#removing-an-otp-generator)
- [License](#license)

## Features
* **Secure**: as much as OpenPGP and your system
Expand Down Expand Up @@ -63,11 +67,11 @@ compelled to reveal metadata relating to your usage -- or worse, your secrets! -
or you are not confident that such a leak may just be caused by a bona fide
implementation error.

### Why not [`pass`][pass]?
There really isn't an answer here. `pass` is just as fine, but you may find it
troublesome handling, moving and syncing its directory-based structure. In the
end, Sigil follows the same philosophy of security and composeability. Tab
completion for password names is something that is not feasible using Sigil,
### Why not `pass`?
There really isn't an answer here. [`pass`][pass] is just as fine, but you may
find it troublesome handling, moving and syncing its directory-based structure.
In the end, Sigil follows the same philosophy of security and composeability.
Tab completion for password names is something that is not feasible using Sigil,
though.

### Why OTPs on a PC?
Expand Down Expand Up @@ -145,6 +149,21 @@ You can import such an URL using `sigil otp import <url>`.
### Removing an OTP generator
You can banish it out of existence using `sigil otp remove <name>`.

## License
Sigil is distributed under the terms of the [Mozilla Public License, v. 2.0][mpl].

Sigil - A password manager for the sneakernet
Copyright (C) 2018 Alberto Coscia <inbox [-at-] albertocoscia [-dot-] me>

This Source Code is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Mozilla Public License for more details.

[pgp]: https://tools.ietf.org/html/rfc4880
[travis]: https://travis-ci.com/ALCC01/sigil
[travis-badge]: https://travis-ci.com/ALCC01/sigil.svg?token=VQqRdWniwWscxaAK7t7z&branch=master
Expand All @@ -159,3 +178,4 @@ You can banish it out of existence using `sigil otp remove <name>`.
[rustup]: https://rustup.rs/
[histcontrol]: https://stackoverflow.com/questions/6475524/how-to-prevent-commands-to-show-up-in-bash-history
[apple-bernardino]: https://www.bloomberg.com/news/articles/2016-02-17/apple-has-the-way-but-not-the-will-to-help-fbi-hack-your-phone
[mpl]: http://mozilla.org/MPL/2.0/
6 changes: 6 additions & 0 deletions src/cli/args.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use cli;
use failure::Error;
use lib::types::{HmacAlgorithm, OtpRecord, Record};
Expand Down
6 changes: 6 additions & 0 deletions src/cli/list.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use lib::utils;
use std::path::PathBuf;
Expand Down
6 changes: 6 additions & 0 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

/// A macro to ask, validate and possibly re-ask the user a question
macro_rules! question {
($validator:expr, $($arg:tt)*) => {
Expand Down
6 changes: 6 additions & 0 deletions src/cli/otp/add.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use gpgme::Context;
use lib::types::{HmacAlgorithm, OtpRecord};
Expand Down
6 changes: 6 additions & 0 deletions src/cli/otp/import.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use gpgme::Context;
use lib::types::{HmacAlgorithm, OtpRecord};
Expand Down
6 changes: 6 additions & 0 deletions src/cli/otp/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

mod add;
mod import;
mod remove;
Expand Down
6 changes: 6 additions & 0 deletions src/cli/otp/remove.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use gpgme::Context;
use lib::utils;
Expand Down
6 changes: 6 additions & 0 deletions src/cli/otp/token.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use gpgme::Context;
use lib::types::OtpRecord;
Expand Down
6 changes: 6 additions & 0 deletions src/cli/password/add.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use gpgme::Context;
use lib::types::Record;
Expand Down
6 changes: 6 additions & 0 deletions src/cli/password/generate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
Expand Down
6 changes: 6 additions & 0 deletions src/cli/password/get.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use gpgme::Context;
use lib::utils;
Expand Down
6 changes: 6 additions & 0 deletions src/cli/password/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

mod add;
mod generate;
mod get;
Expand Down
6 changes: 6 additions & 0 deletions src/cli/password/remove.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use gpgme::Context;
use lib::utils;
Expand Down
6 changes: 6 additions & 0 deletions src/cli/touch.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use failure::Error;
use lib::types::Vault;
use lib::utils;
Expand Down
6 changes: 6 additions & 0 deletions src/lib/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#[derive(Debug, Fail)]
pub enum VaultError {
#[fail(display = "Record should be updated, not added")]
Expand Down
6 changes: 6 additions & 0 deletions src/lib/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

pub mod error;
#[allow(non_snake_case)] // We allow it as we try to have variable names conform to the RFCs
pub mod otp;
Expand Down
6 changes: 6 additions & 0 deletions src/lib/otp.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use base32;
use lib::types::HmacAlgorithm;
use ring::{digest, hmac};
Expand Down
6 changes: 6 additions & 0 deletions src/lib/types.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use lib::error::{OtpError, VaultError};
use lib::otp;
use ring::digest;
Expand Down
6 changes: 6 additions & 0 deletions src/lib/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use gpgme::{Context, Key, Protocol};
use lib::types::Vault;
use std::error::Error;
Expand Down
6 changes: 6 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (C) 2018 Alberto Coscia
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

extern crate env_logger; // TODO env_logger may not be a good fit
#[macro_use]
extern crate structopt;
Expand Down

0 comments on commit 09c984d

Please sign in to comment.