{"id":20345496,"url":"https://github.com/bytebase/database-security-github-actions-example","last_synced_at":"2025-03-04T15:43:09.432Z","repository":{"id":262413036,"uuid":"887156547","full_name":"bytebase/database-security-github-actions-example","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":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-25T17:49:55.513Z","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-01-20T09:00:08.000Z","dependencies_parsed_at":"2024-11-12T10:23:56.524Z","dependency_job_id":"5b6f9979-32c9-4584-ae1b-5f55fbceebf5","html_url":"https://github.com/bytebase/database-security-github-actions-example","commit_stats":null,"previous_names":["bytebase/database-security-github-actions-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fdatabase-security-github-actions-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fdatabase-security-github-actions-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fdatabase-security-github-actions-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fdatabase-security-github-actions-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytebase","download_url":"https://codeload.github.com/bytebase/database-security-github-actions-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241876525,"owners_count":20035396,"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","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":"2024-11-14T22:08:44.866Z","updated_at":"2025-03-04T15:43:09.406Z","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%2Fdatabase-security-github-actions-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebase%2Fdatabase-security-github-actions-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fdatabase-security-github-actions-example/lists"}