Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use full file paths in dataflow report #175

Merged

Conversation

spdawson
Copy link
Contributor

Description

All filenames in the output should consistently use the full path, including the scan target directory prefix.

Sample output before

data_types:
    - name: Email Address
      detectors:
        - name: rails
          locations:
            - filename: ../scan_target_rails/db/schema.rb
              line_number: 18
        - name: ruby
          locations:
            - filename: ../scan_target_rails/config/initializers/devise.rb
              line_number: 186
components:
    - name: Disk
      locations:
        - detector: rails
          filename: config/storage.yml
          line_number: 5
    - name: PostgreSQL
      locations:
        - detector: rails
          filename: config/database.yml
          line_number: 85
    - name: Redis
      locations:
        - detector: gemfile-lock
          filename: Gemfile.lock
          line_number: 191

Sample output after

data_types:
    - name: Email Address
      detectors:
        - name: rails
          locations:
            - filename: ../scan_target_rails/db/schema.rb
              line_number: 18
        - name: ruby
          locations:
            - filename: ../scan_target_rails/config/initializers/devise.rb
              line_number: 186
components:
    - name: Disk
      locations:
        - detector: rails
          filename: ../scan_target_rails/config/storage.yml
          line_number: 5
    - name: PostgreSQL
      locations:
        - detector: rails
          filename: ../scan_target_rails/config/database.yml
          line_number: 85
    - name: Redis
      locations:
        - detector: gemfile-lock
          filename: ../scan_target_rails/Gemfile.lock
          line_number: 191

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@swarmia
Copy link

swarmia bot commented Nov 29, 2022

Copy link
Collaborator

@cfabianski cfabianski left a comment

Choose a reason for hiding this comment

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

what do you think @elsapet?

Copy link
Contributor

@elsapet elsapet left a comment

Choose a reason for hiding this comment

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

🎉

@spdawson spdawson merged commit fd22b9f into main Nov 29, 2022
@spdawson spdawson deleted the AMA-3278-include-project-path-in-filenames-in-dataflow-report branch November 29, 2022 12:32
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.

None yet

3 participants