> For the complete documentation index, see [llms.txt](https://docs.konvu.com/konvu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.konvu.com/konvu/get-started/connect-your-environment/github-packages.md).

# GitHub Packages

Give Konvu read access to private npm and Maven dependencies in GitHub Packages.

Connect GitHub Packages so Konvu can read private npm and Maven dependencies during an exploitability assessment. This connection supplies package credentials; it does not import findings, publish packages, or replace your [source code connection](https://docs.konvu.com/konvu/get-started/connect-your-environment/source-code.md).

The connection belongs to your Konvu organization. Add a separate connection for each ecosystem you use. For Maven, add a connection for each repository that hosts packages your applications need.

## Prerequisites

* Connect the application repository through [source code analysis](https://docs.konvu.com/konvu/get-started/connect-your-environment/source-code.md).
* Create a **personal access token (classic)** with **read:packages**.
* The GitHub account that owns the token must have read access to the packages. If a package inherits repository permissions, the account must be able to read that repository.
* If your GitHub organization uses SAML SSO, [authorize the token for that organization](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-single-sign-on/authorizing-a-personal-access-token-for-use-with-single-sign-on).

You can create the token from **GitHub > Settings > Developer settings > Personal access tokens > Tokens (classic)**. Select an expiry that meets your organization's policy. Konvu needs package read access; it does not need package publishing or deletion permissions. See [GitHub's package permission requirements](https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages).

### Why a classic PAT?

GitHub's npm and Maven registries require a **classic PAT** for authentication outside GitHub Actions. Fine-grained PATs are not supported. See [GitHub's package authentication requirements](https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages#authenticating-to-github-packages).

GitHub Actions can use a workflow's [`GITHUB_TOKEN`](https://docs.github.com/en/actions/concepts/security/github_token) to access packages with the required permissions. That token belongs to the workflow job; Konvu's managed assessments run outside your GitHub Actions workflows. Supply a classic PAT with **read:packages** for this connection. Konvu's GitHub App connection for source code access does not replace this package credential.

## Connect npm

1. Open **Integrations > GitHub Packages** in Konvu.
2. Click **Add connection** if you already have a connection.
3. Select **npm** under **Ecosystem**.
4. Paste the classic PAT into **Personal access token**, then click **Connect**.

Konvu uses `https://npm.pkg.github.com/`. You do not enter an organization or an npm scope in this form.

<figure><img src="https://4216786002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd2uS6kuROSFKDrT5HC1U%2Fuploads%2Fgit-blob-53f574bf3856c99d156449017cf3d3d14056c7dd%2FGitHub%20Packages%20npm%20setup.png?alt=media" alt="GitHub Packages setup with npm selected and a masked fictional token" width="600"><figcaption><p>Select npm and supply a classic PAT. The masked value is fictional.</p></figcaption></figure>

{% hint style="info" %}
A classic PAT belongs to a GitHub account, not to one organization. The npm connection can read packages from more than one GitHub organization if the token owner has access. GitHub package permissions and SSO authorization still apply. Use a token owner with access to all the npm packages your applications need.
{% endhint %}

## Connect Maven

1. Open **Integrations > GitHub Packages** and click **Add connection**.
2. Select **Maven** under **Ecosystem**.
3. Enter **Maven repository URL**, for example `https://maven.pkg.github.com/acme/private-libraries`.
4. Paste the classic PAT into **Personal access token**, then click **Connect**.

The URL identifies the GitHub repository that **hosts the packages**. It can differ from the application repository that consumes them. Use the format `https://maven.pkg.github.com/OWNER/REPOSITORY`. Repeat these steps for other package repositories your applications need.

<figure><img src="https://4216786002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd2uS6kuROSFKDrT5HC1U%2Fuploads%2Fgit-blob-c3cf9869f50a7896c24837d58be6e0de5d0c8ffc%2FGitHub%20Packages%20Maven%20setup.png?alt=media" alt="GitHub Packages setup with Maven selected, a fictional acme package repository URL, and a masked fictional token" width="600"><figcaption><p>For Maven, enter the repository that hosts your packages. The organization, repository and token are fictional.</p></figcaption></figure>

## Check the connection

Open the saved connection to inspect its **Personal access token** and **Package access** details.

| Detail                  | What it means                                                                                                                                             |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Token owner**         | The GitHub account that owns the PAT, which can differ from the person who added the connection to Konvu.                                                 |
| **Expires**             | The expiry GitHub reports. **Expiry not reported** means Konvu cannot show a date; check it in GitHub settings. It does not mean the token never expires. |
| **Granted permissions** | The scopes GitHub reports for the token. A token with **write:packages** also permits package reads, but read access is sufficient for Konvu.             |
| **Added on**            | When the connection was added to Konvu.                                                                                                                   |
| **Token checked**       | When Konvu last checked the token with GitHub. Click **Check token** to refresh these details.                                                            |
| **Package access**      | Registry-wide access for npm, or the configured package repository for Maven. Open the registry chip to see and copy its full URL.                        |

<figure><img src="https://4216786002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd2uS6kuROSFKDrT5HC1U%2Fuploads%2Fgit-blob-e71806d2714da087a358ba805e628609743abed9%2FGitHub%20Packages%20token%20details.png?alt=media" alt="GitHub Packages settings showing a fictional token owner, expiry, read packages permission and Maven repository scope" width="710"><figcaption><p>Review the PAT owner, expiry and package repository. All account and repository details in this example are fictional.</p></figcaption></figure>

{% hint style="info" %}
**Check token** verifies the token with GitHub. It does not download a package or prove access to every dependency. Package permissions, SSO and the configured repository must also allow the downloads your application needs.
{% endhint %}

## Replace a token

1. Create a replacement classic PAT with package read access and any required SSO authorization.
2. Open the connection and click **Replace token**, or use **Actions > Replace token**.
3. Enter **New personal access token**, then click **Replace token** to save it.

Konvu checks the new token before saving it. If validation fails, the existing credential stays in place. Replacement keeps the current registry and package scope. After a successful replacement, Konvu refreshes the owner, permissions and expiry details. If you use the same PAT in npm and Maven connections, replace it in each connection before revoking the old PAT.

## Verify package access during an assessment

Run an assessment for a finding in an application that uses your private packages. Confirm that the repository is included in your [assessment settings](https://docs.konvu.com/konvu/administration/assessment-settings.md). If dependency access fails, check the package permissions and registry configuration before retrying. Connecting the registry alone does not confirm that an assessment has run.

## Troubleshooting

| Problem                                                | What to check                                                                                                                            |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| GitHub rejects the token                               | Use an active, unexpired classic PAT. Confirm that its owner still has access and that organization policies permit it.                  |
| Package read access is missing                         | Give the classic PAT **read:packages**, then replace the saved token.                                                                    |
| Token check succeeds, but private package access fails | Check the owner's access to the specific package or publishing repository, and authorize the PAT for SSO if required.                    |
| Maven cannot resolve a private dependency              | Check that the URL points to the repository that hosts the package. Add connections for other package repositories the application uses. |
| Expiry is not reported                                 | Open the token in GitHub settings to check its expiry. Konvu cannot infer that it has no expiry.                                         |
| npm is already connected                               | Open the existing npm connection and replace its token if needed. Use a PAT that can read the required npm packages.                     |

For the underlying registry configuration, see GitHub's [npm registry guide](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry) and [Maven registry guide](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry).

Next, [read an assessment](https://docs.konvu.com/konvu/triage-and-remediation/exploitability-assessment/reading-an-assessment.md) to inspect the result and its supporting evidence.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.konvu.com/konvu/get-started/connect-your-environment/github-packages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
