A contractor develops a .NET application inside its client's environment. In this example, the contract contains the clause: "Source code and any information derived from it remain within the environment provided by the client." The contractor's tech lead wants to use CodeCharter on developer machines and in CI. That needs approval from the client's IT security team, who will ask which data leaves the environment, where it goes and how to switch it off.
CodeCharter analyzes locally and sends neither source code nor syntax trees. The clause also covers derived information, though, and every analysis produces some. The sections below follow the data paths through a constructed example with CodeCharter v1.7.0 and the GitHub Action v1.11.0.
What a finding contains
The example solution Shop.slnx has two projects, App.Domain and App.Infra. The domain's OrderService takes a SqlOrderRepository from the infrastructure in its constructor. The architecture rule domain-must-not-reach-infrastructure forbids that dependency direction. Its name patterns live in .codecharter/config.yml:
version: 1
params:
domain-must-not-reach-infrastructure.domain: '^App\.Domain\.'
domain-must-not-reach-infrastructure.infrastructure: 'App.Infra.*'
On the developer machine, an analysis run reports the violation (output shortened):
> codecharter analyze Shop.slnx --rules rules --rules-only
--- Error (1) ---
ERROR [Architecture] Domain must not reach infrastructure
App.Domain.OrderService
C:\Users\<user>\…\shop\src\App.Domain\OrderService.cs:3
1 violation (1 error)
With --output sarif:codecharter.sarif the CLI writes the same result as a SARIF file. The entry holds the rule id, a message with the fully qualified type name, the absolute file path and the line:
{
"ruleId": "domain-must-not-reach-infrastructure",
"level": "error",
"message": "Domain must not reach infrastructure: App.Domain.OrderService …",
"artifactLocation": { "uri": "C:/Users/<user>/…/shop/src/App.Domain/OrderService.cs" },
"region": { "startLine": 3, "startColumn": 1 }
}
The report contains no line of source code. A reader still learns that the application has an order domain, stores orders in SQL and breaks a specific layering rule. The absolute path also names the user account on the machine that ran the analysis. A few hundred such entries map out a solution's module structure. Under the clause, the report is therefore derived information.
Connections of a local analysis run
A local codecharter analyze also reaches services outside the environment. None of these connections transfers findings:
- In CI and after
codecharter login, the CLI fetches a license from the portal atcodecharter.toolsthat is valid for 24 hours. It renews it once less than an hour remains and sends only the API key or the login token. - If a rule profile is missing from the cache in
.codecharter/cache, the CLI downloads it from the portal. Profile references without a fixed version inconfig.local.ymlare resolved through the portal on every run. - With a global tool or archive installation, a background process starts after the license check. At most once every 24 hours it asks for a newer CLI version, downloads it and installs it, sending the license token.
- If a project has no restore output, CodeCharter runs
dotnet restoreagainst the project's package sources. In the example, MSBuild also queried the configured package source for package vulnerability data while loading the projects, even though the restore was up to date. That query belongs to the .NET SDK.
The page How we handle source code describes each of these connections with its destination and switch.
Profiles, updates and restore can be handled in advance or switched off. If the project uses portal profiles, codecharter update and codecharter restore fill the cache once while the portal is reachable. From then on, the analysis starts without portal access as long as every profile has a fixed version. For the run itself:
dotnet restore Shop.slnx
export CODECHARTER_SKIP_UPDATE=1
export CODECHARTER_NO_DOTNET_RESTORE=1
codecharter analyze Shop.slnx --rules rules --rules-only
CODECHARTER_NO_DOTNET_RESTORE takes effect for any non-empty value, including 0. It also stops CodeCharter from running the project's MSBuild targets to confirm the restore state. If the restore output is missing after all, the run reports Inconclusive run with the reason restore-missing and exits with code 2. A pipeline can tell from that that the restore step before it did not run.
License renewal remains as long as the CLI fetches its own license from the portal. A developer machine connects for it about once a day, a CI runner without a cached license on every run. Passing the license file with --license or through CODECHARTER_LICENSE turns renewal off, and the CLI then verifies the file locally against built-in keys. An account with an active subscription downloads the file codecharter.license from the portal. It is valid until the subscription ends and is not bound to a device. In the example, the analysis with a license file also ran behind a proxy that rejected every HTTP connection and reported the same violation.
Telemetry is off. A developer turns it on with --telemetry, with CODECHARTER_TELEMETRY=1 or in the configuration. The CLI then sends one event per run with rule ids, severity and finding counts, including custom rules, plus tool name, latency bucket and versions. The license id, an installation id and a hash of the workspace path tie the event to an installation. It contains no file paths, type names or messages.
Data path of the GitHub Action
In a pull request workflow, the Action needs only a few inputs:
- uses: bochmann-software/codecharter@v1
with:
solution: Shop.slnx
api-key: ${{ secrets.CODECHARTER_API_KEY }}
The Action downloads the CLI through the portal, the CLI fetches its 24-hour license, and the analysis runs on the runner. The Action then builds a summary with one table row per finding, up to 100 rows. Each row names the severity, the rule name and a link with the relative file path and line, in the example OrderService.cs:3 pointing to src/App.Domain/OrderService.cs#L3 in the checked commit. The Action sends this summary with the repository name and commit to https://codecharter.tools/api/v1/ci/checks.
The portal publishes the summary through the CodeCharter app as a check run and pull request comment. The service that relays it does not store it. Only with badge: 'true' does the portal store a badge snapshot with counts. If the app is not installed for the repository, the portal rejects the request and the Action posts the comment itself with the workflow token. By then the summary has already reached the portal. comment: 'false' only suppresses the comment, the transfer still happens.
If the clause counts the operator of CodeCharter as a third party, IT security cannot approve the Action in this form. If the repository is on GitHub anyway, paths and lines tell GitHub nothing new. The request then only has to justify the path through the portal separately.
The CLI directly in the workflow
Without the Action, the workflow calls the CLI itself. The CLI comes as the .NET tool CodeCharter.Cli from nuget.org or as an archive from the portal, whose download sends the API key. A custom runner image with the CLI preinstalled avoids both during operation. The license file is stored as a repository secret and written to a file before the run:
- name: CodeCharter
env:
LICENSE_TOKEN: ${{ secrets.CODECHARTER_LICENSE }}
CODECHARTER_SKIP_UPDATE: '1'
run: |
printf '%s' "$LICENSE_TOKEN" > "$RUNNER_TEMP/codecharter.license"
codecharter analyze Shop.slnx --license "$RUNNER_TEMP/codecharter.license" \
--fail-on error --output github-annotations --output sarif:codecharter.sarif
- uses: actions/upload-artifact@v4
if: always()
with:
name: codecharter-sarif
path: codecharter.sarif
retention-days: 1
The only remaining portal traffic is loading rule profiles, if the project uses portal profiles and the runner does not already have them cached. That traffic contains no analysis result either. The annotations appear in the pull request on GitHub and contain file path, line, rule name and message. The SARIF file is stored on GitHub as an artifact. GitHub keeps artifacts for 90 days by default, and retention-days: 1 limits this file to one day. Organization-wide, the period can be set between 1 and 400 days for private repositories and between 1 and 90 days for public ones (GitHub documentation).
In exchange, the app's check run and comment are gone, and the team installs CLI updates itself. If the repository lives on a server of the client, --output sarif: or --output json: writes files that the client's own tools can process.
Local history
CodeCharter's local host serves the web UI and receives the analyses of the MCP server. It accepts connections only on 127.0.0.1, and the web UI requires sign-in through a one-time link. It keeps two data stores. history.jsonl records the command, workspace path, duration, exit code and a findings summary of each run for 30 days. The SQLite database insights.db stores rule id, type name, file, line and message for each finding, plus the branch and Git states of work sessions. Finding events stay there for 180 days, and the file grows to at most 1 GB. On Windows, the database lives in %USERPROFILE%\.local\state\codecharter\host\insights. The run history sits next to it in one directory per CLI version, codecharter-<version>\host\runs. On the test machine, directories of older versions were still present after several updates.
The history never leaves the machine, but it is a more complete report on the project than any SARIF file. The approval therefore treats it like other project data on the developer machine, for example with disk encryption. When the project ends, the team deletes the database and every codecharter-<version> directory.
Data paths for the approval
| Data path | Content | Destination | Limit |
|---|---|---|---|
| CLI installation | Package download, with API key for the portal archive | nuget.org or codecharter.tools | CLI preinstalled in the runner image |
| License fetch | API key or login token | codecharter.tools | none with a license file (--license), otherwise every run on runners without a license cache |
| Rule profiles | Profile name and version | codecharter.tools | fill the cache in advance, fixed versions |
| Self-update | License token, platform | codecharter.tools | CODECHARTER_SKIP_UPDATE |
| Restore | Package names and versions | the project's package sources | restore in advance, CODECHARTER_NO_DOTNET_RESTORE |
| Package vulnerability check by MSBuild | Package names and versions | the project's package sources | part of the .NET SDK, not of CodeCharter |
| Telemetry | Rule ids with counts, license id, installation id, workspace path hash | codecharter.tools | off unless someone enables it |
| Action summary | Rule names, file paths, lines, repository, commit | codecharter.tools, then GitHub | the CLI directly in the workflow |
| Annotations and SARIF artifact | File path, line, rule, message | GitHub | retention-days |
Rule upload with codecharter push |
Rule files and .spec.md files with code samples |
codecharter.tools | only when explicitly run |
| Rule editor in the portal | Rule source and specification | Anthropic through the portal | only when the editor's AI features are used |
| Local history | Findings with message, branch, Git states | developer machine | 30 and 180 days |
With a license file, a preinstalled CLI, updates switched off and a prefilled profile cache, day-to-day operation needs no connection to the CodeCharter portal. The only outbound traffic is then the requests to the project's package sources and to GitHub for annotations and the artifact. The approval request lists the table, asks for these connections and names the chosen limit for every other row.
IT security can verify the table before approving it. To do so, the workflow runs once behind a proxy that allows only the requested destinations. Every rejected connection in the proxy log is a data path missing from the table.