From 5b2681fee07b40f4355cee8a8c08b7f428d85df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20de=20Metz?= Date: Mon, 5 Dec 2022 22:26:40 +0100 Subject: [PATCH] Add docs on github_organization_dependabot_alert and github_repository_dependabot_alert --- .../github_organization_dependabot_alert.md | 52 +++++++++++++++++++ .../github_repository_dependabot_alert.md | 49 +++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 docs/tables/github_organization_dependabot_alert.md create mode 100644 docs/tables/github_repository_dependabot_alert.md diff --git a/docs/tables/github_organization_dependabot_alert.md b/docs/tables/github_organization_dependabot_alert.md new file mode 100644 index 00000000..38a173c4 --- /dev/null +++ b/docs/tables/github_organization_dependabot_alert.md @@ -0,0 +1,52 @@ +# Table: github_organization_dependabot_alert + +The `github_organization_dependabot_alert` table can be used to query information about dependabot alerts from an organization. You must be an owner or security manager for the organization to successfully query dependabot alerts. + +**You must specify the organization** in the where or join clause (`where organization=`, `join github_organization_depedanbot_alert on organization=`). + +## Examples + +### List dependabot alerts + +```sql +select + organization, + state, + dependency_package_ecosystem, + dependency_package_name +from + github_organization_dependabot_alert +where + organization = 'my_org'; +``` + +### List open dependabot alerts + +```sql +select + organization, + state, + dependency_package_ecosystem, + dependency_package_name +from + github_organization_dependabot_alert +where + organization = 'my_org' + and state = 'open'; +``` + +### List open critical dependabot alerts + +```sql +select + organization, + state, + dependency_package_ecosystem, + dependency_package_name +from + github_organization_dependabot_alert +where + organization = 'my_org' + and state = 'open' + and security_advisory_severity = 'critical'; +``` diff --git a/docs/tables/github_repository_dependabot_alert.md b/docs/tables/github_repository_dependabot_alert.md new file mode 100644 index 00000000..44ee250a --- /dev/null +++ b/docs/tables/github_repository_dependabot_alert.md @@ -0,0 +1,49 @@ +# Table: github_repository_dependabot_alert + +The `github_repository_dependabot_alert` table can be used to query information about dependabot alerts from a repository. + +**You must specify which repository** in the where or join clause using the `repository_full_name` column. + +## Examples + +### List dependabot alerts + +```sql +select + state, + dependency_package_ecosystem, + dependency_package_name +from + github_repository_dependabot_alert +where + repository_full_name = 'turbot/steampipe'; +``` + +### List open dependabot alerts + +```sql +select + state, + dependency_package_ecosystem, + dependency_package_name +from + github_repository_dependabot_alert +where + repository_full_name = 'turbot/steampipe' + and state = 'open'; +``` + +### List open critical dependabot alerts + +```sql +select + state, + dependency_package_ecosystem, + dependency_package_name +from + github_repository_dependabot_alert +where + repository_full_name = 'turbot/steampipe' + and state = 'open' + and security_advisory_severity = 'critical'; +```