Security

The client handles an API credential, licensed financial data, temporary result locations, and potentially confidential hosted-application files. Treat each as sensitive.

Token controls

  • Store tokens in a secret manager or a permission-restricted local file.
  • Inject production tokens at runtime.
  • Never commit token files or direct token literals.
  • Never include a token in notebook input/output, logs, screenshots, support tickets, or exception messages.
  • Keep token files free of trailing whitespace because the current reader does not strip it.
  • Rotate immediately after suspected disclosure.
  • Grant each integration the least-privileged token available.

token.key is read from the current directory when token is empty. An explicit absolute path is safer for services whose working directory can change.

Repository hygiene

Before sharing, packaging, or publishing this repository:

  1. scan tracked and untracked files for token-like values;
  2. inspect notebook source and saved outputs;
  3. inspect example scripts and local configuration;
  4. inspect Git remotes and submodule URLs for embedded credentials;
  5. inspect Git history, not only the current tree;
  6. inspect built wheels and source archives;
  7. revoke every exposed credential before removing it;
  8. rewrite history where required by incident policy.

Replacing a credential with a placeholder does not revoke the original value.

Network behavior

The client:

  • posts request JSON over HTTPS;
  • sends the token as x-api-key;
  • receives a temporary result URL;
  • polls that URL over HTTP(S);
  • can download report browser content;
  • can upload application file arguments to temporary storage.

Do not log headers or temporary URLs. Restrict outbound network access to expected services where deployment architecture permits it.

The polling implementation does not enforce HTTP status checks or socket-level timeouts. Monitor at the process/platform level and review proxy/TLS interception behavior. Do not disable certificate validation.

Hosted-application files

A path supplied to an argument declared File is uploaded before application execution.

  • Confirm the application and data classification are approved.
  • Remove credentials and unnecessary personal/confidential fields.
  • Prefer a purpose-built sanitized export over an operational source file.
  • Understand service-side retention and access controls.
  • Do not assume the local filename remains private.
  • Treat failures after upload as potentially leaving a remote temporary copy.

Browser report values

Default DataFrame conversion of a scalar Browser value downloads server-supplied HTML and attempts to open it with Selenium/Chrome.

For production, CI, servers, or untrusted content:

report = pacifico.request(
    "token.key",
    item="<ITEM>",
    format="json",
)

Inspect and allow-list URLs before opening them. Browser conversion also uses a predictable temporary filename in the current working directory and is not appropriate for concurrent untrusted workloads.

Output files

The built-in writer overwrites files directly and does not create directories, set restrictive permissions, encrypt data, or write atomically.

Consumers are responsible for:

  • output directory permissions;
  • encryption at rest;
  • backups and retention;
  • safe atomic replacement;
  • preventing path injection when fileName comes from user input;
  • confirming downstream licensing constraints.

Logging

Useful safe fields include:

  • route and selector category;
  • sanitized ticker/document/item identifiers when policy permits;
  • start/end date;
  • timeout and polling interval;
  • elapsed time;
  • output format and row count;
  • exception class and a sanitized message.

Do not log:

  • token value or token-file content;
  • full request headers;
  • temporary result URLs;
  • application file contents;
  • full raw responses by default;
  • licensed data beyond approved telemetry.

Dependencies

The package has a broad dependency set, including networking, AWS, SSH/SFTP, Selenium, and browser-driver packages.

  • Pin dependencies for reproducible deployments.
  • Run vulnerability and license scanning.
  • Build in a controlled environment.
  • Avoid import-time package installation by installing declared dependencies in advance.
  • Review the shared submodule revision.
  • Remove unused runtime capabilities in a future version only through tested packaging changes.

Incident response

If a token or confidential payload is exposed:

  1. contain access and stop further publication;
  2. revoke/rotate the token through Pacifico Research;
  3. identify every copy in files, history, artifacts, caches, notebooks, logs, and backups;
  4. remove or redact according to policy;
  5. review access logs and data scope;
  6. notify security, data owners, and Pacifico Research as required;
  7. document root cause and add a preventive check.

Data and software rights

Possession of the client package does not grant unrestricted rights to API data. Apply the token's service agreement, vendor/source restrictions, and the package's proprietary license independently.