-
Notifications
You must be signed in to change notification settings - Fork 119
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
Samples updates - Fixes and new contributions #1178
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jshcodes
added
code samples
Functioning sample code to get you started
community
Developer community topics
labels
Jun 5, 2024
adding an advanced host search which can take partial matches of a hostname in a wildcard manner from either the command line or hostname file, as well as ignore comments in a hostname file to keep a cleaner output.csv.
added Host Search Advanced section. Fixed typo with Host Report header section.
jlangdev
approved these changes
Jun 6, 2024
This was referenced Jun 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sample updates
This update provides a new code sample and updates three existing samples.
Unit test coverage
Bandit analysis
[main] INFO running on Python 3.11.8 Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:01 Run started:2024-06-05 14:36:53.376443 Test results: No issues identified. Code scanned: Total lines of code: 16530 Total lines skipped (#nosec): 2 Run metrics: Total issues (by severity): Undefined: 0 Low: 0 Medium: 0 High: 0 Total issues (by confidence): Undefined: 0 Low: 0 Medium: 0 High: 0 Files skipped (0):
Added features and functionality
Added: Regex search functionality add to the Stale Sensors (CUSSED) sample. Date time calculation updated to follow latest python syntax. Implemented by added new arg for host regex, fix warnings, and errors #1163.
samples/hosts/stale_sensors.py
Added: New advanced host search sample that allows for stemmed wildcard searches. Implemented by Added Sample - Host Search Advanced #1174.
samples/hosts/host_search_advanced.py
Issues resolved
Fixed: Added authentication failure message when invalid credentials provided to the Sensor Download sample. Implemented by Bug fixes #1162 download_sensor.py add error if auth fails #1164 to address download_sensor.py / no error message when authentification failed #1162.
samples/sensor_download/download_sensor.py
Fixed: Updated Host Search sample to ignore comments when outputting search results. Implemented by Updated get_hostnames function to ignore comments. #1169 to address Sample - host_search.py - Includes comments from hostname_file in output.csv #1168.
samples/hosts/host_search.py