Skip to main content

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.

Metadata

Release files for gitguardian-client 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitguardian-client 1.0.0
File Size Uploaded Provenance Actions
gitguardian-client-1.0.0.tar.gz 65.7 kB Without provenance Details for gitguardian-client-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gitguardian-client 1.0.0
File Interpreter ABI Platform Actions
gitguardian_client-1.0.0-py3-none-any.whl Python 3 none any Details for gitguardian_client-1.0.0-py3-none-any.whl

Total release size: 217.2 kB

Release files / gitguardian-client-1.0.0.tar.gz

Download URL gitguardian-client-1.0.0.tar.gz
Size 65.7 kB
Tags Source
SHA-256 checksum
How to use checksums
94abe436af590d9241e55bcf07f94960935be4f2d3f509d6b79ce19288bfc53f
BLAKE2b-256 checksum
How to use checksums
f8d6f42b3a21aeadf103b035da19587e7c147bbf4f8dd2b830fd2900f2dfc818
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Release files / gitguardian_client-1.0.0-py3-none-any.whl

Download URL gitguardian_client-1.0.0-py3-none-any.whl
Size 151.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbe1c60afa2cb263404758a0ffd79671cb38b641ab3d8f33bdafe84d7e09a782
BLAKE2b-256 checksum
How to use checksums
6eb0c7deaa6e23bf4cbf8699ade35a27c510c0e77132b3109db83397c481b61c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Security for gitguardian-client 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page