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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file gitguardian-client-1.0.0.tar.gz.

File metadata

  • Download URL: gitguardian-client-1.0.0.tar.gz
  • Upload date:
  • Size: 65.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for gitguardian-client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 94abe436af590d9241e55bcf07f94960935be4f2d3f509d6b79ce19288bfc53f
MD5 6ce2ed7c2e8c9091a596862f18256027
BLAKE2b-256 f8d6f42b3a21aeadf103b035da19587e7c147bbf4f8dd2b830fd2900f2dfc818

See more details on using hashes here.

Provenance

File details

Details for the file gitguardian_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gitguardian_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe1c60afa2cb263404758a0ffd79671cb38b641ab3d8f33bdafe84d7e09a782
MD5 8e779890c6cf99a8e443bf89d5e19dfb
BLAKE2b-256 6eb0c7deaa6e23bf4cbf8699ade35a27c510c0e77132b3109db83397c481b61c

See more details on using hashes here.

Provenance

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