Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nillion secretvault #279

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

wwwehr
Copy link

@wwwehr wwwehr commented Feb 6, 2025

What changed? Why?

This PR introduces an agentic privacy preserving data storage layer: SecretVault by Nillion.

As an agentic programmer, I want to use prompts to store my data in a privacy preserving stack so that I can have confidence that the data will not leak sensitive information.

Qualified Impact

The environment now requires a few new (crypto) python packages to support the change. This would likely need maintenance as the packages mature or have security updates.

Demonstration

Here is the agent flow

Prompt: create me a schema to track my valuable inventory of jewelry and the insurance value. then add test data
-------------------
I've created a schema to track your valuable jewelry inventory, including fields for item name, type, description, insurance value, and acquisition date. Additionally, I added the following test data:

1. **Diamond Ring**
   - **ID:** c0b1d08e-9c43-4f3c-9a3f-4f9b7c8d3f2d
   - **Type:** Ring
   - **Description:** A beautiful diamond ring with a 1-carat diamond.
   - **Insurance Value:** $5000
   - **Acquisition Date:** 2023-01-15T10:00:00Z

2. **Gold Necklace**
   - **ID:** e8a3f1a2-8c10-4b8d-9c53-3e4e7f3b5c1b
   - **Type:** Necklace
   - **Description:** A 24k gold necklace with intricate designs.
   - **Insurance Value:** $3000
   - **Acquisition Date:** 2023-02-20T14:30:00Z

If you need more assistance, feel free to ask!
-------------------

Prompt: download all the data from my jewelry schema 
-------------------
Here is the data from your jewelry inventory schema:

1. **Diamond Ring**
   - **ID:** fbed9771-d328-42d0-84db-d2d9fd9ccfae
   - **Type:** Ring
   - **Description:** A beautiful diamond ring with a 1-carat diamond.
   - **Insurance Value:** $5000
   - **Acquisition Date:** 2023-01-15T10:00:00.000Z

2. **Gold Necklace**
   - **ID:** 530db1d2-f5a4-4cc3-a34d-68f98b39f012
   - **Type:** Necklace
   - **Description:** A 24k gold necklace with intricate designs.
   - **Insurance Value:** $3000
   - **Acquisition Date:** 2023-02-20T14:30:00.000Z

If you need any further assistance, just let me know!

The stored data is secret shared across the distributed database cluster. Here is what the data looks like in each database node

** HOST 0
[
  {
    "_id": "fbed9771-d328-42d0-84db-d2d9fd9ccfae",
    "item_name": "Diamond Ring",
    "item_type": "Ring",
    "description": "A beautiful diamond ring with a 1-carat diamond.",
    "insurance_value": {
      "$share": "PX7yppJ4"
    },
    "acquisition_date": "2023-01-15T10:00:00.000Z",
    "_created": "2025-02-06T14:33:04.600Z",
    "_updated": "2025-02-06T14:33:04.600Z"
  },
  {
    "_id": "530db1d2-f5a4-4cc3-a34d-68f98b39f012",
    "item_name": "Gold Necklace",
    "item_type": "Necklace",
    "description": "A 24k gold necklace with intricate designs.",
    "insurance_value": {
      "$share": "H/4wXt4M"
    },
    "acquisition_date": "2023-02-20T14:30:00.000Z",
    "_created": "2025-02-06T14:33:04.600Z",
    "_updated": "2025-02-06T14:33:04.600Z"
  }
]
** HOST 1
[
  {
    "_id": "fbed9771-d328-42d0-84db-d2d9fd9ccfae",
    "item_name": "Diamond Ring",
    "item_type": "Ring",
    "description": "A beautiful diamond ring with a 1-carat diamond.",
    "insurance_value": {
      "$share": "cgmCwTwJ"
    },
    "acquisition_date": "2023-01-15T10:00:00.000Z",
    "_created": "2025-02-06T14:33:05.175Z",
    "_updated": "2025-02-06T14:33:05.175Z"
  },
  {
    "_id": "530db1d2-f5a4-4cc3-a34d-68f98b39f012",
    "item_name": "Gold Necklace",
    "item_type": "Necklace",
    "description": "A 24k gold necklace with intricate designs.",
    "insurance_value": {
      "$share": "thP/kJVf"
    },
    "acquisition_date": "2023-02-20T14:30:00.000Z",
    "_created": "2025-02-06T14:33:05.175Z",
    "_updated": "2025-02-06T14:33:05.175Z"
  }
]
** HOST 2
[
  {
    "_id": "fbed9771-d328-42d0-84db-d2d9fd9ccfae",
    "item_name": "Diamond Ring",
    "item_type": "Ring",
    "description": "A beautiful diamond ring with a 1-carat diamond.",
    "insurance_value": {
      "$share": "TlNFV55B"
    },
    "acquisition_date": "2023-01-15T10:00:00.000Z",
    "_created": "2025-02-06T14:33:05.831Z",
    "_updated": "2025-02-06T14:33:05.831Z"
  },
  {
    "_id": "530db1d2-f5a4-4cc3-a34d-68f98b39f012",
    "item_name": "Gold Necklace",
    "item_type": "Necklace",
    "description": "A 24k gold necklace with intricate designs.",
    "insurance_value": {
      "$share": "qMn8/ntj"
    },
    "acquisition_date": "2023-02-20T14:30:00.000Z",
    "_created": "2025-02-06T14:33:05.831Z",
    "_updated": "2025-02-06T14:33:05.831Z"
  }
]

@cb-heimdall
Copy link

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@wwwehr wwwehr marked this pull request as ready for review February 6, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants