Package: credsweeper
CredSweeperCredSweeperIntroductionHow To UseMain RequirementsInstallationRunConfigDevelopTestsBenchmarkOverall ArchitectureRetrain ModelLicenseHow to Get InvolvedProject RolesContributorMaintainerHow to ContactIntroductionCredSweeper is a tool to detect credentials in any directories or files.
CredSweeper could help users to detect unwanted exposure of credentials
(such as tokens, passwords, api keys etc.) in advance.
By scanning lines, filtering, and using AI model as option,
CredSweeper reports lines with possible credentials, where the line is,
and expected type of the credential as a result.Full documentation can be found here:https://credsweeper.readthedocs.io/How To UseMain RequirementsPython 3.8, 3.9, 3.10, 3.11InstallationDetailshere.pipinstallcredsweeperRunHow to use.Get all argument list:python-mcredsweeper--helpRun CredSweeper:python-mcredsweeper--pathtests/samples/password.gradle--save-jsonoutput.jsonTo check JSON file run:catoutput.json[{"api_validation":"NOT_AVAILABLE","ml_validation":"VALIDATED_KEY","ml_probability":0.99755,"rule":"Password","severity":"medium","confidence":"moderate","line_data_list":[{"line":"password = \"cackle!\"","line_num":1,"path":"tests/samples/password.gradle","info":"","value":"cackle!","value_start":12,"value_end":19,"variable":"password","entropy_validation":{"iterator":"BASE64_CHARS","entropy":2.120589933192232,"valid":false}}]}]Configcredsweeper/secret/config.json- Configuration file for pre-processing of CredSweeper. For more details please checkhere.You can set thepattern,extensionandpathyou want to exclude from scanning as below.{"exclude":{"pattern":["AKIA[0-9A-Z]{9}EXAMPLE",...],"extension":["gif","jpg",...],"path":["/.git/","/openssl/",...]},...}And you can also setsource_ext,source_quote_ext,find_by_ext_list,check_for_literals,line_data_output, andcandidate_outputas below.source_ext: List of extensions for scanning categorized as source files.source_quote_ext: List of extensions for scanning categorized as source files that using quote.find_by_ext_list: List of extensions to detect only extensions.check_for_literals: Bool value for whether to check line has string literal declaration or not.line_data_output: List of attributes ofline_datafor output.candidate_output: List of attributes ofcandidatefor output.{..."source_ext":[".py",".cpp",...],"source_quote_ext":[".py",".cpp",...],"find_by_ext_list":[".pem",".cer",...],"check_for_literals":true,"line_data_output":["line","line_num",...],"candidate_output":["rule","severity",...]}credsweeper/rules/config.yaml- Configuration file for setting Rule. For more details please checkhere....-name:APIseverity:mediumconfidence:moderatetype:keywordvalues:-apifilter_type:GeneralKeyworduse_ml:truevalidations:[]-name:AWS Client ID...DevelopTestsTo run all tests:python-mpytest--cov=credsweeper--cov-report=term-missing-stests/To run only tests independent of external api:python-mpytest-m"not api_validation_test"tests/To obtain manageable (without subprocesses) coverage:python-mpytest--cov=credsweeper--cov-report=htmltests/--ignore=tests/test_app.pyBenchmarkWe have a dataset for testing credential scanners that calledCredData. If you want to test CredSweeper with this dataset please checkhere.Overall ArchitectureTo check overall architecture of CredSweeper please checkhere.Retrain ModelIf you want to check how model was trained or retrain it on your own data, please refer to theexperimentfolderLicenseThe CredSweeper is an Open Source project released under the terms ofMIT License V2.How to Get InvolvedIn addition to developing under an Open Source license, A use an Open Source Development approach, welcoming everyone to participate, contribute, and engage with each other through the project.Project RolesA recognizes the following formal roles: Contributor and Maintainer. Informally, the community may organize itself and give rights and responsibilities to the necessary people to achieve its goals.ContributorA Contributor is anyone who wishes to contribute to the project, at any level. Contributors are granted the following rights, to:Contribute code, documentation, translations, artwork, and etc.Report defects (bugs) and suggestions for enhancement.Participate in the process of reviewing contributions by others.If you want to participate in the project development, check out thehow to contribute guidelinein advance.Contributors who show dedication and skill are rewarded with additional rights and responsibilities. Their opinions weigh more when decisions are made, in a fully meritocratic fashion.MaintainerA Maintainer is a Contributor who is also responsible for knowing, directing and anticipating the needs of a given a Module. As such, Maintainers have the right to set the overall organization of the source code in the Module, and the right to participate in the decision-making. Maintainers are required to review the contributor’s requests and decide whether to accept or not.NameE-MailJaeku Yunjk0113.yun@samsung.comShinhyung Choish519.choi@samsung.comYujeong Leeyujeongg.lee@samsung.comOleksandra Sokolo.sokol@samsung.comDmytro Kuzmenkod.kuzmenko@samsung.comArkadiy Melkonyana.melkonyan@samsung.comHow to ContactPlease post questions,issues, or suggestions in issues. This is the best way to communicate with the developers.