Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: browserstack/github-actions
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 93aebce
Choose a base ref
...
head repository: browserstack/github-actions
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1092dd1
Choose a head ref
  • 15 commits
  • 30 files changed
  • 9 contributors

Commits on Apr 30, 2026

  1. feat(ai-evals): add

      BrowserStack AI Evals action
    EMMUUU28 committed Apr 30, 2026
    Configuration menu
    Copy the full SHA
    c5cab01 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2026

  1. node version upgrade

    Raghav11-11 committed May 5, 2026
    Configuration menu
    Copy the full SHA
    6830ab2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75e2ea2 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #84 from Raghav11-11/aps-19023-node24-migration

    Upgrade Node version to 24 (APS-19023)
    karanshah-browserstack authored May 5, 2026
    Configuration menu
    Copy the full SHA
    d6cb8ba View commit details
    Browse the repository at this point in the history

Commits on May 7, 2026

  1. fix(security): bundle for APS-19076 / APS-19077 / APS-19078

    - APS-19076 (CVSS 9.3, env-var injection): allowlist env-var names
      exported from the BrowserStack rerun API in setBStackRerunEnvVars.
      Adds ALLOWED_RERUN_ENV_VARS (BROWSERSTACK_RERUN, BROWSERSTACK_RERUN_TESTS,
      BROWSERSTACK_BUILD_NAME) to setup-env/config/constants.js; filtered
      loop in setup-env/src/actionInput/index.js calls core.exportVariable
      only for allowlisted keys and core.warning for everything else.
      Updates existing test, adds negative-case test, rebuilds dist.
    
    - APS-19077 (CVSS 8.7, supply chain + token scope): pins
      actions/setup-node@v4.4.0 and actions/checkout@v4.2.2 by SHA in both
      .github/workflows/setup-env.yml and setup-local.yml; adds top-level
      permissions: { contents: read } block to give the GITHUB_TOKEN least
      privilege (these workflows only run unit tests).
    
    - APS-19078 (CVSS 7.6, stored XSS via report HTML): adds sanitize-html
      to browserstack-report-action; sanitizes basicHtml/richHtml in
      ReportProcessor.js with a strict allowlist (no inline event handlers,
      no javascript: URLs); strips JS hooks from richCss with sanitizeCss();
      injects CSP meta (script-src 'none'; default-src 'none') into the
      artifact HTML head in UploadFileForArtifact.js as defense-in-depth;
      rebuilds dist.
    
    Tests: setup-env 37 passing (was 36, +1 negative-case); report-action
    18 passing (no regression). Standalone XSS-strip sanity covers six
    payloads including <img src=x onerror=alert(1)>, <script>, javascript:
    URLs, <svg onload>, <iframe javascript:>; all stripped, safe HTML
    preserved.
    
    Resolves: APS-19076, APS-19077, APS-19078
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    Jimesh-browserstack and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    8ade0a3 View commit details
    Browse the repository at this point in the history
  2. [APS-19078] restrict data: scheme to <img> in report sanitizer

    Integration test caught a click-to-XSS bypass: <a href="data:text/html,<script>...</script>">
    survived because data: was allowed on all elements. Restrict to <img> for inline
    screenshots; block on <a>/<iframe>/etc.
    Jimesh-browserstack committed May 7, 2026
    Configuration menu
    Copy the full SHA
    67f66ea View commit details
    Browse the repository at this point in the history
  3. [APS-19078] fix CI: replace regex HTML strip with sanitize-html (CodeQL)

    CodeQL flagged the `<script|iframe|object|embed>` regex in sanitizeCss as
    "incomplete multi-character sanitization" (high severity x2 — src + dist).
    A single-pass replace is bypassable by nested patterns like `<scr<script>ipt>`,
    which collapse to `<script>` after one substitution.
    
    Fix: strip ALL HTML tags from the rich-CSS payload via sanitize-html with
    allowedTags: [] (the library iterates internally and is not bypassable).
    The CSS-function regexes for `expression(...)` and `url(javascript:...)`
    remain — they target CSS syntax, not HTML, and CodeQL did not flag them.
    
    Verified:
    - 18/18 unit tests pass (no regression)
    - Sanity script confirms `<scr<script>ipt>` no longer leaves a `<script`
      substring in the output
    - Flagged regex literal absent from rebuilt dist/index.js
    - Lint clean
    
    Resolves: CodeQL failure on PR #85
    Jimesh-browserstack committed May 7, 2026
    Configuration menu
    Copy the full SHA
    88b3a53 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2026

  1. Merge pull request #85 from browserstack/fix/aps-19076-19077-19078-se…

    …curity-bundle
    
    [APS-19076][APS-19077][APS-19078] fix: security hardening — env-var allowlist, workflow SHA pinning, report HTML sanitization
    karanshah-browserstack authored May 8, 2026
    Configuration menu
    Copy the full SHA
    3d416d0 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2026

  1. test(ai-evals): add Mocha + Chai + Sinon test suite for runExperiment

    Adds a unit test suite matching sibling action conventions:
    - 8 tests covering all RunResult status branches (NOT_FOUND, CREATE_FAILED,
      FAILED, PASS, REGRESSION) and exit codes (0/1/2/3)
    - Stubs the SDK at its method boundary so tests are deterministic, fast,
      and isolated from network/auth concerns
    - Asserts CI metadata pass-through to experimentRuns.create as the 5th arg
    - Asserts lifecycle progress messages
    
    Tooling:
    - mocha + chai + sinon + nyc (matches setup-env / setup-local / browserstack-report-action)
    - ts-node loader so Mocha can read .ts source directly
    - @typescript-eslint v8 (supports TypeScript 5.9)
    - husky pre-commit hook: runs test + build + stages dist/ so src and dist
      cannot drift in a published commit
    
    'npm test' chains tsc --noEmit -> eslint -> nyc mocha with HTML coverage
    report (coverage/index.html, gitignored).
    EMMUUU28 committed May 13, 2026
    Configuration menu
    Copy the full SHA
    c3680f0 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2026

  1. Configuration menu
    Copy the full SHA
    7a1de51 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2026

  1. Merge pull request #86 from EMMUUU28/feat/ai-evals

      feat(ai-evals): add BrowserStack AI Evals GitHub Action
    Ravneet2003 authored Jun 1, 2026
    Configuration menu
    Copy the full SHA
    110c0a8 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2026

  1. semgrep workflow: pin Docker image and actions to version tags

    Pin returntocorp/semgrep container image to a specific version
    and GitHub Actions to major version tags to prevent :latest
    tag resolution and reduce supply-chain attack surface.
    
    Fixes: LCNC-15821
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    bstack-security-github and claude committed Jun 19, 2026
    Configuration menu
    Copy the full SHA
    1ab56d9 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2026

  1. fix(setup-env): do not override a build/project name the workflow nev…

    …er set
    
    setEnvVariables() exported BROWSERSTACK_BUILD_NAME and
    BROWSERSTACK_PROJECT_NAME unconditionally. When the workflow supplied
    neither input, _validateInput() had already replaced them with generated
    defaults -- the repo name, and "<event> [Workflow: <n>]" -- so the action
    exported values the user never asked for.
    
    Every BrowserStack SDK resolves names as CLI args > env vars > config file.
    An exported default therefore does not fill a gap, it OUTRANKS whatever the
    user configured and silently replaces it. A customer following our own
    documented setup for re-run delivery saw their browserstack.json
    project_name/build_name of "E2E_Automation" replaced by
    "core-automation-framework" and "workflow_dispatch [Workflow: 7]".
    
    Export each variable only when its input was actually supplied. The
    generated values remain available through the BUILD_INFO and REPO_NAME
    tokens that InputValidator already understands -- which is what those
    tokens were for. When an input is omitted the action now logs that it left
    the variable unset, so the behaviour is visible in the workflow log.
    
    Ref: SDK-7461 (follow-on to SDK-7124)
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    2 people authored and rounak610 committed Sep 4, 2026
    Configuration menu
    Copy the full SHA
    e6365c7 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2026

  1. fix(setup-env): trim verbose comments per review

    Address review feedback on PR #87 (shayan-bstack): reduce the two
    explanatory comment blocks to the essential rationale, matching the
    file's existing comment density. Rebuilt dist. No behaviour change.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    rounak610 and claude committed Sep 7, 2026
    Configuration menu
    Copy the full SHA
    d2e8a43 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2026

  1. Merge pull request #87 from rounak610/fix/sdk-7461-do-not-override-un…

    …set-build-project-name
    
    [SDK-7461] fix(setup-env): do not export a build/project name the workflow never set
    karanshah-browserstack authored Sep 9, 2026
    Configuration menu
    Copy the full SHA
    1092dd1 View commit details
    Browse the repository at this point in the history
Loading