Skip to content

Conversation

@nnoce14
Copy link
Member

@nnoce14 nnoce14 commented Jan 12, 2026

Fixes #154

Summary by Sourcery

Add local EdgeScan integration support for macOS developers and align dependencies for shared routing packages.

New Features:

  • Introduce an edgescan:dev script to run EdgeScan DAST scans locally via Apple Native Containers.
  • Expose an edgescan:agent script for CI/CD and GitHub Copilot automation-driven EdgeScan scans.

Enhancements:

  • Update react-router-dom dependency versions to 7.12.0 in shared UI packages for consistency.

Documentation:

  • Document local EdgeScan setup and usage, including macOS Apple Native Containers and API token configuration steps.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 12, 2026

Reviewer's Guide

Adds a macOS-focused local EdgeScan DAST workflow, introduces separate npm scripts for CI/agent vs local scanning, documents the setup, and aligns React Router DOM versions and script formatting across UI packages.

Sequence diagram for pnpm edgescan:dev local DAST workflow on macOS

sequenceDiagram
  actor Developer
  participant Terminal
  participant pnpm
  participant AppleNativeContainers
  participant EdgeScanContainer
  participant EdgeScanAPI

  Developer->>Terminal: pnpm run edgescan:dev
  Terminal->>pnpm: Execute edgescan:dev script
  pnpm->>AppleNativeContainers: container run --tty --rm --platform linux/amd64 edgescan/cicd-integration:latest
  AppleNativeContainers->>EdgeScanContainer: Start container with ES_API_TOKEN and asset id 74096
  EdgeScanContainer->>EdgeScanAPI: Authenticate using ES_API_TOKEN
  EdgeScanContainer->>EdgeScanAPI: Start scan for asset 74096 with max risk threshold 3
  EdgeScanAPI-->>EdgeScanContainer: Scan progress and results
  EdgeScanContainer-->>AppleNativeContainers: Exit with scan status and colorized output
  AppleNativeContainers-->>pnpm: Return container exit code and logs
  pnpm-->>Terminal: Print scan results
  Terminal-->>Developer: Display DAST findings and status
Loading

File-Level Changes

Change Details Files
Introduce dedicated EdgeScan npm scripts for CI/agent automation and local macOS development scans.
  • Rename/repurpose the previous generic edgescan:run script into edgescan:agent for CI/CD and GitHub Copilot AI agent usage.
  • Add an edgescan:dev script that runs the edgescan/cicd-integration image via Apple Native Containers with a fixed local asset id, targeting macOS developers.
  • Ensure both scripts pass API token and asset identifiers through environment variables and share scan flags (start, wait, threshold, color).
package.json
Document local EdgeScan usage, focusing on macOS Apple Native Containers setup and API token configuration.
  • Add an EdgeScan section explaining its role as a DAST platform and how it differs from Snyk/SonarCloud.
  • Document usage restrictions for edgescan:agent (CI/Copilot only) and promote edgescan:dev for local validation.
  • Add step-by-step instructions for installing and starting Apple Native Containers and verifying system status on macOS.
  • Add guidance for generating an EdgeScan API token and exporting ES_API_TOKEN in the shell profile.
apps/docs/docs/intro.md
Align React Router DOM versions and normalize npm script formatting in UI packages.
  • Update react-router-dom dependency in ui-community UI package to 7.12.0.
  • Update react-router-dom dependency in ocom ui-components package to 7.12.0.
  • Normalize indentation for npm scripts in ui-community package.json for consistent formatting.
apps/ui-community/package.json
packages/ocom/ui-components/package.json
pnpm-lock.yaml

Assessment against linked issues

Issue Objective Addressed Explanation
#154 Add a new package.json script to run EdgeScan locally on macOS using Apple Native Containers, expecting ES_API_TOKEN in the environment and hardcoding the DEV asset ID, only for local development (not wired into CI/CD).
#154 Rename the existing docker-based edgescan:run script to edgescan:agent for CI/CD and Copilot usage.
#154 Provide clear developer documentation for local EdgeScan usage, including macOS container prerequisites and ES_API_TOKEN setup, and clarify that edgescan:agent is reserved for automation.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

…lity and adjust knip.json to ignore additional binaries
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New security issues found

@nnoce14
Copy link
Member Author

nnoce14 commented Jan 12, 2026

@sourcery-ai review

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 security issue, and left some high level feedback:

Security issues:

  • Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (link)

General comments:

  • In the edgescan:dev script, consider using the $ES_ASSET_ID environment variable (as in edgescan:agent) instead of hardcoding 74096 to avoid accidental misuse against the wrong asset and keep configuration consistent.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the `edgescan:dev` script, consider using the `$ES_ASSET_ID` environment variable (as in `edgescan:agent`) instead of hardcoding `74096` to avoid accidental misuse against the wrong asset and keep configuration consistent.

## Individual Comments

### Comment 1
<location> `apps/docs/docs/intro.md:129` </location>
<code_context>
420be748f18afc685d11987ac5118c928e174c19
</code_context>

<issue_to_address>
**security (generic-api-key):** Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

*Source: gitleaks*
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds EdgeScan security scanning integration for local macOS development by introducing Apple Native Containers support, alongside dependency updates for react-router-dom.

Changes:

  • Added edgescan:dev script for macOS developers using Apple Native Containers and renamed existing Docker-based script to edgescan:agent
  • Added Apple Native Containers setup documentation to enable local EdgeScan scanning
  • Updated react-router-dom from 7.0.2/7.8.2 to 7.12.0 across UI packages

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Added edgescan:dev script for Apple Native Containers and renamed edgescan:run to edgescan:agent
knip.json Added "container" binary to ignored binaries list for the Apple Native Containers CLI
apps/docs/docs/intro.md Added Apple Native Containers one-time setup instructions for macOS developers
apps/ui-community/package.json Updated react-router-dom to 7.12.0 and reformatted script indentation
packages/ocom/ui-components/package.json Updated react-router-dom to 7.12.0
pnpm-lock.yaml Updated dependency lockfile for react-router-dom 7.12.0 and transitive @babel/runtime update
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@nnoce14
Copy link
Member Author

nnoce14 commented Jan 13, 2026

@sourcery-ai review

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 security issue, 2 other issues, and left some high level feedback:

Security issues:

  • Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (link)

General comments:

  • The edgescan:dev script hardcodes --asset-id 74096; consider sourcing this from an environment variable (like ES_ASSET_ID_DEV) or a config file so it’s not tied to a specific asset in code.
  • Since edgescan:dev depends on Apple Native Containers and is macOS-specific, consider adding a small platform check or a clear runtime error message in the script to avoid confusing failures on non-macOS environments.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `edgescan:dev` script hardcodes `--asset-id 74096`; consider sourcing this from an environment variable (like `ES_ASSET_ID_DEV`) or a config file so it’s not tied to a specific asset in code.
- Since `edgescan:dev` depends on Apple Native Containers and is macOS-specific, consider adding a small platform check or a clear runtime error message in the script to avoid confusing failures on non-macOS environments.

## Individual Comments

### Comment 1
<location> `apps/docs/docs/intro.md:109` </location>
<code_context>

+## Local EdgeScan Setup
+
+EdgeScan is a **Dynamic Application Security Testing (DAST)** platform. Unlike Snyk or SonarCloud which analyze source code, EdgeScan scans **live, running applications** to provide deep security intelligence and continuous vulnerability profiling for our serverless architecture.
+
+**How to use:**
</code_context>

<issue_to_address>
**nitpick (typo):** Consider adding a comma after "SonarCloud" to improve grammatical clarity.

Rephrasing to “Unlike Snyk or SonarCloud, which analyze source code, EdgeScan scans live, running applications…” clearly marks “which analyze source code” as a non‑restrictive clause and improves readability.

```suggestion
EdgeScan is a **Dynamic Application Security Testing (DAST)** platform. Unlike Snyk or SonarCloud, which analyze source code, EdgeScan scans **live, running applications** to provide deep security intelligence and continuous vulnerability profiling for our serverless architecture.
```
</issue_to_address>

### Comment 2
<location> `apps/docs/docs/intro.md:143` </location>
<code_context>
+
+### 2. EdgeScan API Token
+
+1. Login to [intealth.edgescan.com](https://intealth.edgescan.com).
+2. Go to your **Profile Settings** and generate an API token for your account.
+3. Export the token in your terminal (consider adding this to your `~/.zshrc` or `~/.bashrc`):
</code_context>

<issue_to_address>
**issue (typo):** Use "Log in" (verb) instead of "Login" (noun) in this step.

Consider changing the text to: "Log in to [intealth.edgescan.com](https://intealth.edgescan.com)."

```suggestion
1. Log in to [intealth.edgescan.com](https://intealth.edgescan.com).
```
</issue_to_address>

### Comment 3
<location> `apps/docs/docs/intro.md:129` </location>
<code_context>
420be748f18afc685d11987ac5118c928e174c19
</code_context>

<issue_to_address>
**security (generic-api-key):** Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

*Source: gitleaks*
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@nnoce14
Copy link
Member Author

nnoce14 commented Jan 13, 2026

@sourcery-ai review

@nnoce14 nnoce14 requested a review from Copilot January 13, 2026 19:50
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 security issue, and left some high level feedback:

Security issues:

  • Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (link)

General comments:

  • The edgescan:dev script hard-codes --asset-id 74096; consider reading this from an environment variable (with a sensible default if needed) so different developers or environments can target their own asset IDs without modifying package.json.
  • Since edgescan:agent is intended for CI/agents only, you might add a brief inline comment in package.json near the script definition to reinforce that it’s not for local use and relies on ES_ASSET_ID being set in the environment.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `edgescan:dev` script hard-codes `--asset-id 74096`; consider reading this from an environment variable (with a sensible default if needed) so different developers or environments can target their own asset IDs without modifying `package.json`.
- Since `edgescan:agent` is intended for CI/agents only, you might add a brief inline comment in `package.json` near the script definition to reinforce that it’s not for local use and relies on `ES_ASSET_ID` being set in the environment.

## Individual Comments

### Comment 1
<location> `apps/docs/docs/intro.md:129` </location>
<code_context>
420be748f18afc685d11987ac5118c928e174c19
</code_context>

<issue_to_address>
**security (generic-api-key):** Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

*Source: gitleaks*
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

```bash
container system start
```
Input `Y` when prompted.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

Source: gitleaks

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement EdgeScan local integration script for macOS developers in package.json

2 participants