{"id":31722893,"url":"https://github.com/purestorage-openconnect/embedding-security","last_synced_at":"2025-10-09T04:21:54.067Z","repository":{"id":310647779,"uuid":"1040670901","full_name":"PureStorage-OpenConnect/Embedding-Security","owner":"PureStorage-OpenConnect","description":"Sample scripts to simulate embedding security scenarios","archived":false,"fork":false,"pushed_at":"2025-08-19T10:55:53.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-19T12:39:02.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PureStorage-OpenConnect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-19T10:31:48.000Z","updated_at":"2025-08-19T10:55:56.000Z","dependencies_parsed_at":"2025-08-19T12:39:05.104Z","dependency_job_id":"3e40e5d5-4eb6-466a-88e2-7ffea72326c2","html_url":"https://github.com/PureStorage-OpenConnect/Embedding-Security","commit_stats":null,"previous_names":["purestorage-openconnect/embedding-security"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/PureStorage-OpenConnect/Embedding-Security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2FEmbedding-Security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2FEmbedding-Security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2FEmbedding-Security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2FEmbedding-Security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PureStorage-OpenConnect","download_url":"https://codeload.github.com/PureStorage-OpenConnect/Embedding-Security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2FEmbedding-Security/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000754,"owners_count":26082921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T04:21:51.364Z","updated_at":"2025-10-09T04:21:54.062Z","avatar_url":"https://github.com/PureStorage-OpenConnect.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Embedding-Security\n\n\nEmbedding Inversion Simulation\nThis script demonstrates how a vector embedding, which may seem anonymous, can be reverse-engineered to reconstruct the original sensitive data it represents. It uses a real sentence-transformer model to generate embeddings and a text generation model (GPT-2) to simulate the reconstruction attack.\n\nRequirements\nPython 3.7+\n\npip (Python package installer)\n\nInstallation\nClone or download the repository/script.\n\nNavigate to the script's directory in your terminal.\n\nInstall the required Python libraries using the provided requirements.txt file. Run the following command:\n\npip install -r requirements.txt\n\nThis will install all necessary packages, including numpy, torch, sentence-transformers, transformers, and scipy.\n\nRunning the Simulation\nOnce the installation is complete, you can run the simulation script directly from your terminal:\n\npython3 simulation_embedding.py\n\nThe script will then execute the simulation, printing the original secret, the generated \"anonymous\" vector, the discovered semantic keywords, and the final reconstructed text to your console.\n\n###########################################################\n\n\n\n\n\nSecond script demonstrate  Data Poisoning the AI's knowledge base to skew its output or inject bias.\tUploading malicious documents or compromising data feeds before they are vectorized.\n\n\npython3  rag_poisoning.py \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurestorage-openconnect%2Fembedding-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurestorage-openconnect%2Fembedding-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurestorage-openconnect%2Fembedding-security/lists"}