Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/github/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

The GitHub Security Advisories datastream lets you retrieve reviewed and unreviewed global security advisories from the GitHub advisory database. Check [Working with security advisories](https://docs.github.com/en/code-security/security-advisories) for more details.

To use this integration, you must [create a fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) (GitHub App user access tokens, GitHub App installation access tokens, Fine-grained personal access tokens). This fine-grained token does not require any permissions.
To use this integration, you may [create a fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) (GitHub App user access tokens, GitHub App installation access tokens, Fine-grained personal access tokens). This fine-grained token does not require any permissions. Authentication is not required when accessing data from public repositories, so you can leave the API key field blank in that case.

Check notice on line 116 in packages/github/_dev/build/docs/README.md

View workflow job for this annotation

GitHub Actions / Lint Documentation

Elastic.WordChoice: Consider using 'can, might' instead of 'may', unless the term is in the UI.

{{fields "security_advisories"}}

Expand Down
5 changes: 5 additions & 0 deletions packages/github/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "2.23.1"
changes:
- description: Change API key variable to optional for security advisories data stream, as authentication is not required for public repositories.
type: bugfix
link: https://github.com/elastic/integrations/pull/18545
Comment thread
macroscopeapp[bot] marked this conversation as resolved.
- version: "2.23.0"
changes:
- description: Enable Agentless deployment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ resource.tracer:
maxbackups: 5
resource.url: {{api_url}}
state:
{{#if api_key}}
api_key: {{api_key}}
{{/if}}
advisory_type: {{advisory_type}}
batch_size: {{batch_size}}
redact:
Expand All @@ -29,7 +31,7 @@ program: |-
"Header": {
"Accept": ["application/vnd.github+json"],
"X-GitHub-Api-Version": ["2022-11-28"],
"Authorization": ["Bearer " + state.api_key],
?"Authorization": has(state.api_key) && state.api_key != "" ? optional.ofNonZeroValue(["Bearer " + state.api_key]) : optional.ofNonZeroValue([]),
},
}).do_request().as(resp, (resp.StatusCode != 200) ?
{
Expand All @@ -50,7 +52,7 @@ program: |-
:
bytes(resp.Body).decode_json().as(body,
{
"api_key": state.api_key,
?"api_key": state.?api_key,
"advisory_type": state.advisory_type,
"batch_size": state.batch_size,
"cursor": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ streams:
- name: api_key
type: password
title: API key
description: API key for GitHub REST API. This Personal Access Token is used to authenticate with the GitHub REST API and should be kept secret.
description: The GitHub Personal Access Token (PAT) is used to authenticate with the GitHub REST API. You may leave this field blank for public repositories, as authentication is not required for them.
multi: false
required: true
required: false
show_user: true
secret: true
- name: advisory_type
Expand Down
2 changes: 1 addition & 1 deletion packages/github/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@

The GitHub Security Advisories datastream lets you retrieve reviewed and unreviewed global security advisories from the GitHub advisory database. Check [Working with security advisories](https://docs.github.com/en/code-security/security-advisories) for more details.

To use this integration, you must [create a fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) (GitHub App user access tokens, GitHub App installation access tokens, Fine-grained personal access tokens). This fine-grained token does not require any permissions.
To use this integration, you may [create a fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) (GitHub App user access tokens, GitHub App installation access tokens, Fine-grained personal access tokens). This fine-grained token does not require any permissions. Authentication is not required when accessing data from public repositories, so you can leave the API key field blank in that case.

Check notice on line 1030 in packages/github/docs/README.md

View workflow job for this annotation

GitHub Actions / Lint Documentation

Elastic.WordChoice: Consider using 'can, might' instead of 'may', unless the term is in the UI.

**Exported fields**

Expand Down
2 changes: 1 addition & 1 deletion packages/github/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: github
title: GitHub
version: "2.23.0"
version: "2.23.1"
description: Collect logs from GitHub with Elastic Agent.
type: integration
format_version: "3.4.0"
Expand Down
Loading