-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update app_svc.py #3198
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
Update app_svc.py #3198
Conversation
Skip swap files created by nano while developing rules
|
Thoughts on swapping this out for only accepting .yml/.yaml files and nothing else? This would be more effective than playing whack-a-mole with other file extensions that may pop up due to other text editors |
|
@uruwhy , that's a great idea honestly.. this was just a quick fix while I was in the middle of another project.. The swp files here are binary and were capable of crashing the caldera instance. |
Update logic to exclude all non yml files
There was a problem hiding this 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 a file filter to prevent the application from processing non-YAML files when watching for ability file changes, specifically addressing errors caused by nano editor swap files during development.
- Adds a check to skip files that don't end with '.yml' extension
- Includes debug logging for skipped files
- Prevents UnicodeDecodeError exceptions from binary swap files
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|



Skip swap files created by nano while developing rules.
Description
Small fix for app_svc to avoid errors from swp files while locally editing with nano while caldera is running.
Type of change
How Has This Been Tested?
Tested locally, after making the change nano editing no longer throws errors (like the following)
Checklist:
(none needed)