Giter Site home page Giter Site logo

turbot / steampipe-plugin-bitbucket Goto Github PK

View Code? Open in Web Editor NEW
7.0 13.0 3.0 328 KB

Use SQL to instantly query Bitbucket. Open source CLI. No DB required.

Home Page: https://hub.steampipe.io/plugins/turbot/bitbucket

License: Apache License 2.0

Makefile 0.21% Go 98.89% PLSQL 0.91%
sql postgresql steampipe steampipe-plugin postgresql-fdw bitbucket atlassian-bitbucket hacktoberfest backup etl sqlite zero-etl

steampipe-plugin-bitbucket's Introduction

image

Bitbucket Plugin for Steampipe

Use SQL to query repositories, projects, merge requests and more from Bitbucket.

Quick start

Install the plugin with Steampipe:

steampipe plugin install bitbucket

Run a query:

select name, uuid, is_private, full_name from bitbucket_my_repository;

Engines

This plugin is available for the following engines:

Engine Description
Steampipe The Steampipe CLI exposes APIs and services as a high-performance relational database, giving you the ability to write SQL-based queries to explore dynamic data. Mods extend Steampipe's capabilities with dashboards, reports, and controls built with simple HCL. The Steampipe CLI is a turnkey solution that includes its own Postgres database, plugin management, and mod support.
Postgres FDW Steampipe Postgres FDWs are native Postgres Foreign Data Wrappers that translate APIs to foreign tables. Unlike Steampipe CLI, which ships with its own Postgres server instance, the Steampipe Postgres FDWs can be installed in any supported Postgres database version.
SQLite Extension Steampipe SQLite Extensions provide SQLite virtual tables that translate your queries into API calls, transparently fetching information from your API or service as you request it.
Export Steampipe Plugin Exporters provide a flexible mechanism for exporting information from cloud services and APIs. Each exporter is a stand-alone binary that allows you to extract data using Steampipe plugins without a database.
Turbot Pipes Turbot Pipes is the only intelligence, automation & security platform built specifically for DevOps. Pipes provide hosted Steampipe database instances, shared dashboards, snapshots, and more.

Developing

Prerequisites:

Clone:

git clone https://github.com/turbot/steampipe-plugin-bitbucket.git
cd steampipe-plugin-bitbucket

Build, which automatically installs the new version to your ~/.steampipe/plugins directory:

make

Configure the plugin:

cp config/* ~/.steampipe/config
vi ~/.steampipe/config/bitbucket.spc

Try it!

steampipe query
> .inspect bitbucket

Further reading:

Open Source & Contributing

This repository is published under the Apache 2.0 (source code) and CC BY-NC-ND (docs) licenses. Please see our code of conduct. We look forward to collaborating with you!

Steampipe is a product produced from this open source software, exclusively by Turbot HQ, Inc. It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our Open Source FAQ.

Get Involved

Join #steampipe on Slack →

Want to help but don't know where to start? Pick up one of the help wanted issues:

steampipe-plugin-bitbucket's People

Contributors

bigdatasourav avatar cbruno10 avatar dependabot[bot] avatar lalitlab avatar madhushreeray30 avatar misraved avatar pdecat avatar sayan133 avatar subhajit97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steampipe-plugin-bitbucket's Issues

Extend bitbucket_workspace_member to capture MFA info for the user

Is your feature request related to a problem? Please describe.
Finding the existing members enabled with MFA will help.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Add table bitbucket_issue

References
Add any related links that will help us understand the resource, including vendor documentation, related GitHub issues, and Go SDK documentation.

Include a boolean field for "Branch Restrictions Inheritance" or similar on the bitbucket_branch_restriction or both bitbucket_my_repository and bitbucket_repository

Is your feature request related to a problem? Please describe.
I have been working with the bitbucket plugin for a while now and one of my use cases refers to the "bitbucket_branch_restriction" table, so that I can find out if there are repositories with insecure permissions. My issue right now is that there are repositories that inherit branch restrictions from the project, as you can see here:
image
When I use the query to show branch restrictions for this particular repository, the result is as if it was not set, as you can see below, which is not true (inherited):
image

Describe the solution you'd like
I believe that using the API endpoint below to include one extra column to the bitbucket_my_repository table could solve my problem temporarily, as there seems like a project settings api for querying branch restrictions at the project level does not exist yet (I requested it though):
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-override-settings-get
One thing to note is that this endpoint won't work with the current personal access token, as you can see below:
image
For this api endpoint to work, we will need the Workspace Access Token, that can be created at:
https://bitbucket.org//workspace/settings/access-tokens
When it works correctly, the result should be like this:
image

Describe alternatives you've considered
I have no other idea at the moment other than using the GUI, unfortunately.

Additional context
No other context I can offer here.

Unable to get information about more than 10 branches in Bitbucket Plugin

Describe the bug
Unable to get information about more than 10 branches.

Steampipe version (steampipe -v)
v0.15.3

Plugin version (steampipe plugin list)
v0.2.1

To reproduce
Steps to reproduce the behavior .

Need to have more than 10 branches in a repository

select
  count(*)
from
  bitbucket_branch
where
  repository_full_name='workspace-name/repo-name'

Expected behavior
Get the count of all branches present in the repo

Additional context
Plugin: Bitbucket
Currently giving maximum branch count as 10, even if the actual count is greater.

Add bitbucket_workspace_member table with associated group info.

Is your feature request related to a problem? Please describe.
Current table does not provide info for associated grp info. Good to have this col is captured.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

invalid scopes in bitbucket.spc file

Describe the bug

the .spc file contains scopes for "read:user" and "user:read" but they don't exist

Steampipe version (steampipe -v)**
v0.16.4

bitbucket plugin v0.3.0

To reproduce
install the plugin and look at the .spc file

Expected behavior
only valid scopes are listed

Support on-prem Bitbucket Server

Is your feature request related to a problem? Please describe.
This plugin does not work with bitbucket-server (on-premise) installation, as it's rest-API is different than hosted bitbucket.

Describe the solution you'd like
Plugin updated to work with the on-prem API

Describe alternatives you've considered
None, I need this to be able to use steampipe.

Add column role in table bitbucket_workspace_member

Table bitbucket_workspace_member should have a column role that would be reflecting the groups roles that a particular member has in a workspace.
Here it is showing the roles that Madhushree Ray has in the turbotdev workspace
Screenshot 2022-10-10 at 11 50 27 AM

Add table bitbucket_audit_log

References
Add any related links that will help us understand the resource, including vendor documentation, related GitHub issues, and Go SDK documentation.

Add table bitbucket_workspace

References
Add any related links that will help us understand the resource, including vendor documentation, related GitHub issues, and Go SDK documentation.

Add table bitbucket_pull_request

References
Add any related links that will help us understand the resource, including vendor documentation, related GitHub issues, and Go SDK documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.