Skip to main content

Gitguardian api client

Project description

Gitguardian Python SDK 1.0.0

Welcome to the Gitguardian SDK documentation. This guide will help you get started with integrating and using the Gitguardian SDK in your project.

Versions

  • API version: 1.1.0
  • SDK version: 1.0.0

About the API

Whether you want to build a complete integration with your software development workflow or simply want to test GitGuardian's policy break detection on any text content, you can use our API. - The base url for the latest version is api.gitguardian.com/v1 over HTTPS. - All data is sent and received as JSON by default. - All timestamps returned are ISO-8601 compliant, example: python 2020-03-16T04:46:00+00:00 # for date-time GitGuardian supported wrappers: - Python: py-gitguardian GitGuardian provides you with GitGuardian Shield, a CLI application that uses the GitGuardian API through py-gitguardian to scan your files and detect potential secrets or issues in your code. This CLI application can be used in many CIs (such as GitHub Actions, GitLab Pipelines, CircleCI,...) or as a pre-commit or pre-receive hook. # Authentication The GitGuardian API uses API keys to authenticate requests. For a detailed explanation, please refer to our dedicated documentation. Use /v1/health to check the validity of your token if needed. # Pagination The GitGuardian API employs cursor-based pagination. For a detailed explanation, please refer to our dedicated documentation.

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: Python >= 3.7

Installation

To get started with the SDK, we recommend installing using pip:

pip install gitguardian-client

Authentication

Access Token Authentication

The Gitguardian API uses an Access Token for authentication.

This token must be provided to authenticate your requests to the API.

Setting the Access Token

When you initialize the SDK, you can set the access token as follows:

Gitguardian(
    access_token="YOUR_ACCESS_TOKEN"
)

If you need to set or update the access token after initializing the SDK, you can use:

sdk.set_access_token("YOUR_ACCESS_TOKEN")

Services

The SDK provides various services to interact with the API.

Below is a list of all available services with links to their detailed documentation:
Name
ApiTokensService
SecretIncidentsService
SecretIncidentNotesService
SecretOccurrencesService
InvitationsService
MembersService
ScanMethodsService
SecretDetectorsService
QuotaService
IaCScanMethodsService
SourcesService
AuditLogsService
StatusService
TeamsService
TeamInvitationsService
TeamMembershipsService
TeamRequestsService
TeamSourcesService
HoneytokensService
HoneytokenNotesService
HoneytokenSourcesService
HoneytokensEventsService
LabelsService
ScaService

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models with links to their detailed documentation:
Name Description
ApiTokenDetails Details of an API Token
ApiTokenStatusEnum
ApiTokenScopeEnum
ListApiTokensOrdering
PublicJwtCreateRequest
PublicJwtCreateOkResponse
IncidentWithoutOccurrences
StatusEnum
SeverityEnum
ValidityEnum
ListIncidentsOrdering
Incident
RetrieveIncidentsLeaksOkResponse
AssignIncidentRequest
ResolveIncidentRequest
IgnoreIncidentRequest
ShareIncidentRequest
IncidentToken
GrantAccessIncidentRequest
RevokeAccessIncidentRequest
IncidentMember
IncidentPermissionEnum
MemberAccessLevelEnum
IncidentTeam
IncidentInvitation
Member
ListSecretIncidentMemberAccessOrdering
Team
Invitation
ListSecretIncidentInvitationAccessOrdering
ListSourcesIncidentsOrdering
ListTeamIncidentsOrdering
IncidentNote
ListIncidentNotesOrdering
CreateIncidentNoteRequest
UpdateIncidentNoteRequest
VcsOccurrence
SourceTypeQueryParamsEnum
PresenceEnum
ListOccsOrdering
ListInvitationsOrdering
CreateInvitationsRequest
ResendInvitationOkResponse
ResourceInvitationAccess
ResourceType
ListInvitationSecretIncidentAccessOrdering
ListMembersOrdering
ResourceMemberAccess
ListMemberSecretIncidentAccessOrdering
TeamMembership
Document
ScanResult Result of a content scan.
DetectorGroup
DetectorGroupTypeEnum
ListSecretDetectorsOrdering
Quota
ScanIacRequest
IacScanResult
DiffScanIacRequest
IacDiffScanResult
Source
ScanStatusEnum
SourceHealthEnum
ListSourcesOrdering
ListSourcesVisibility Filter by visibility status.
SourceCriticality Filter by source criticality.
AuditLog
HealthCheckOkResponse Health check response.
CreateTeamsRequest
ResourceTeamAccess
ListTeamSecretIncidentAccessOrdering
TeamInvitation
TeamPermissionEnum
CreateTeamInvitationsRequest
UpdateTeamInvitationRequest
UpdateTeamMembershipRequest
TeamRequest
AcceptTeamRequestRequest
ListTeamSourcesType Filter by integration type.
ListTeamSourcesOrdering
ListTeamSourcesVisibility Filter by visibility status.
UpdateTeamSourcesRequest
Honeytoken
ListHoneytokenStatus Status of a honeytoken.
ListHoneytokenType Type of a honeytoken.
ListHoneytokenOrdering
CreateHoneytokenRequest
CreateHoneytokenWithContextRequest
HoneyTokenWithContext
UpdateHoneytokenRequest
HoneyTokenNote
ListHoneytokenNotesOrdering
CreateHoneytokenNoteRequest
UpdateHoneytokenNoteRequest
HoneyTokenSource
ListHoneytokenSourcesOrdering
HoneyTokenEvent
ListHoneytokensEventsOrdering
ListHoneytokensEventsStatus
HoneyTokenLabel
CreateHoneytokenLabelRequest
PatchHoneytokenLabelRequest
ComputeScaFilesOkResponse
ScaScanAllRequest
ScaScanAllOkResponse
ScaScanDiffRequest
ScaScanDiffOkResponse
ApiTokenTypeEnum
Detector
SecretStatusEnum
TagEnum
OccurrenceKindEnum
Match
SecretIncidentsBreakdown Detailed count of secret incidents linked to this source.
Scan
SourceSeverityBreakdown
SeverityBreakdown
HmslSourceTypeEnum
NonOwnerMemberAccessLevelEnum
PolicyBreak Issue found in your Document
Validity Validity of the found secret.
Matches
Content
IacScanTarParameters
SeverityEnumIac
EntitiesWithIncidents
Incidents
IacStatusEnum
IacDiffScanResultEntitiesWithIncidents
AuditLogActionTypeEnum
HoneytokenStatus Status of the honeytoken.
HoneytokenType Type of the honeytoken.
HoneyTokenEventTag
CreateHoneytokenRequestType honeytoken type
CreateHoneytokenWithContextRequestType Honeytoken type.
HoneyTokenSourceType
HoneyTokenEventStatus Status of the honeytoken event.
ScaScanTarParameters
ScaIgnoredVulnerability
LocationOutputSchema
PackageVulnerabilityOutputSchema
DependencyTypeEnum
ExposedVulnerabilityOutputSchema

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitguardian-client-1.0.0.tar.gz (65.7 kB view hashes)

Uploaded Source

Built Distribution

gitguardian_client-1.0.0-py3-none-any.whl (151.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page