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

Feature/security scanners #49

Merged
merged 12 commits into from
May 29, 2024
Merged

Feature/security scanners #49

merged 12 commits into from
May 29, 2024

Conversation

EvieePy
Copy link
Member

@EvieePy EvieePy commented May 25, 2024

Description

Adds additional token/security scanners and the ability to quickly add additional scanners for other services.

Current scanners:
Discord
GitHub
PyPi

This PR also takes line numbers from the frontend and does them Python side. This has allowed for faster loading, less jumpy behaviour and the ability to highlight particular lines, mainly those which have a known token.

This PR also normalises line endings at paste creation.

The schema had to be changed for line warnings and the new scanners to be accomplished.

This PR also fixed a bug where pressing enter on the language selector on a password protected paste would trigger a htmx request.

Fixed a bug where changing languages more than once on password protected paste would not work.

CSS changes have also been made including:
Changing the font to JetBrains Mono
Changing annotations contrast.
Adding a tooltip to annotations.
Adding line warnings.

All the changes can be found live at:
https://staging.mystb.in

Since this is a large PR, I would like it if this isn't merged until atleast 2 other people have reviewed.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have updated the changelog with a quick recap of my changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)
  • I have read and agree to the Developer Certificate of Origin for this contribution

Copy link
Collaborator

@AbstractUmbra AbstractUmbra left a comment

Choose a reason for hiding this comment

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

Small nitpicks on the Python side.

Since this change requires a database change, the deployment will involve a manual step, please ensure one of the people capable of accessing the host is around when merging. :)

core/scanners.py Outdated Show resolved Hide resolved
core/scanners.py Outdated Show resolved Hide resolved
core/scanners.py Show resolved Hide resolved
core/database.py Outdated Show resolved Hide resolved
core/scanners.py Show resolved Hide resolved
core/scanners.py Outdated Show resolved Hide resolved
@EvieePy EvieePy merged commit 60d163b into main May 29, 2024
2 checks passed
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

4 participants