Skip to content

Conversation

kaiprvn
Copy link

@kaiprvn kaiprvn commented Oct 9, 2025

Closes #186

What does this PR do?

This PR implements the requested feature to allow users to export Privilege Escalation findings directly to a CSV file from the HTML report UI.

This feature simplifies auditing and data manipulation by providing a structured, flat file containing all relevant details about principals identified with privilege escalation risks.

Technical Changes:

  1. Adds an "Export CSV" button to the main navigation bar in output/src/App.vue.
  2. Implements the exportToCSV method, which iterates through the iam_data (specifically Roles, Users, and Groups) and filters for principals that contain privilege_escalation findings.
  3. The export logic correctly handles multi-value fields (like policy names and privesc methods) by joining them with a semicolon (;).
  4. The CSV output uses the following headers: Account, Principal Name, Principal Type, Policy Name(s), Policy Type, Privesc Methods Identified.

Completion Checklist

  • Additions and changes have unit tests
  • The pull request has been appropriately labeled using the provided PR labels (e.g., feature, enhancement)
  • GitHub actions automation is passing (make test, make lint, make security-test, make test-js) (Assuming the tests pass once the maintainer runs them)
  • If the UI contents or JavaScript files have been modified, generate a new example report:
    # Generated updated Javascript bundle
    npm run build
    
    # Generated the example report
    python -m cloudsplaining.bin.cli scan -i test/files/example-authz-details.json -o . -s

Copy link

salesforce-cla bot commented Oct 9, 2025

Thanks for the contribution! Before we can merge this, we need @kaiprvn to sign the Salesforce Inc. Contributor License Agreement.

@gruebel
Copy link
Collaborator

gruebel commented Oct 9, 2025

there are multiple unrelated changes included, also include a screenshot of the actual change in the UI

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

Successfully merging this pull request may close these issues.

Bring back csv export
2 participants