{"id":28437178,"url":"https://github.com/bytebase/example-database-security","last_synced_at":"2026-02-09T18:03:01.073Z","repository":{"id":262413036,"uuid":"887156547","full_name":"bytebase/example-database-security","owner":"bytebase","description":"Enforce database permissions, data masking with Bytebase API and GitHub Actions.","archived":false,"fork":false,"pushed_at":"2025-01-20T09:00:05.000Z","size":180,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-20T19:54:32.262Z","etag":null,"topics":["data-masking","data-security","database-security"],"latest_commit_sha":null,"homepage":"","language":null,"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/bytebase.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}},"created_at":"2024-11-12T09:09:55.000Z","updated_at":"2025-03-29T15:37:34.000Z","dependencies_parsed_at":"2024-11-12T10:23:56.524Z","dependency_job_id":"5b6f9979-32c9-4584-ae1b-5f55fbceebf5","html_url":"https://github.com/bytebase/example-database-security","commit_stats":null,"previous_names":["bytebase/database-security-github-actions-example","bytebase/example-database-security"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bytebase/example-database-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-database-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-database-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-database-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-database-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytebase","download_url":"https://codeload.github.com/bytebase/example-database-security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-database-security/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29274739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T17:15:22.002Z","status":"ssl_error","status_checked_at":"2026-02-09T17:14:42.395Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["data-masking","data-security","database-security"],"created_at":"2025-06-05T23:09:09.026Z","updated_at":"2026-02-09T18:03:01.040Z","avatar_url":"https://github.com/bytebase.png","language":null,"readme":"# Database Security GitHub Actions Example\n\nThis directory demonstrates how to use Bytebase API and GitHub Actions to configure data security related features.\nYou can refer this example to build a GitOps solution to codify all data security policies.\n\nThis example shows a typical directory structure:\n\n1. **principal**. Users, groups.\n1. **iam**. Roles, Query, and Export permission settings.\n1. **masking**. Dynamic data masking.\n\nIf you are familiar with Google Cloud Platform (GCP), you may notice the Bytebase model is quite familiar:\n\n1. [GCP Project](https://cloud.google.com/resource-manager/docs/creating-managing-projects)\n1. [GCP IAM](https://cloud.google.com/security/products/iam)\n1. [GCP Org policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview)\n\n# Fetch the access token with service account\n\nTo call the Bytebase API, you need to use the service account\n\nDoc: https://www.bytebase.com/docs/api/authentication/\n\n```bash\nexport bytebase_url=http://localhost:5678\nbytebase_account=\"api@service.bytebase.com\"\nbytebase_password=\"bbs_QUYgvZaOsI2Hlal3a7k4\"\nbytebase_token=$(curl -v ${bytebase_url}/v1/auth/login \\\n    --data-raw '{\"email\":\"'${bytebase_account}'\",\"password\":\"'${bytebase_password}'\",\"web\":true}' \\\n    --compressed 2\u003e\u00261 | grep token | grep -o 'access-token=[^;]*;' | grep -o '[^;]*' | sed 's/access-token=//g; s/;//g')\necho $bytebase_token\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fexample-database-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebase%2Fexample-database-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fexample-database-security/lists"}