Git Product home page Git Product logo

cens's Issues

Notify API Keys

@duboisp thanks for granting us access

After taking a quick look looks like the Notify API KEY is getting passed around and stored in a few spots:

Example:
https://github.com/ServiceCanada/x-notify/blob/5dea006de3e4d020aacf7a4318096822413050d6/controllers/subscriptions.js#L69

https://github.com/ServiceCanada/x-notify/blob/master/controllers/subscriptions.js#L79

The api key should be kept as secret (environment variable) and not stored. For example we may need to revoke the api key at our level or rotate the keys.

Also here:
https://github.com/ServiceCanada/x-notify/tree/master/test#database-command

I understand this might be used by multiple departs but we'll need to look at other ways of doing that.

Info Exposure in confirmation link

Hey team,

Just wanted to raise this to your attention as we forgot to mention it yesterday in the check-in.

The code below that generates the confirmation link, is populating the recipients email address into the URL, which will create the potential for these pieces of PII to be registered in logs, browser caches, etc.

https://github.com/ServiceCanada/x-notify/blob/e282fc7752d4f6aa06c34570c81334b88ba54220/controllers/subscriptions.js#L512

I've linked to the relevant OWASP description of the issue below.

https://owasp.org/www-community/vulnerabilities/Information_exposure_through_query_strings_in_url

Proposed Solution:

Generate a UUID and replace email with that token in the url, using the UUID as a query/insertion key accordingly.

Add OSS License

Adding an OSS license like MIT would help clarify legal parameters for other jurisdictions interested in replicating the x-notify system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.