-
Notifications
You must be signed in to change notification settings - Fork 0
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
Updates related to the MCP Prod deployment and code / document improvements #139
base: main
Are you sure you want to change the base?
Conversation
… nodes, have Node specific OpenSearch registry names and used a data source for S3 to read existing staging bucket in MCP Prod.
|
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.
Just need a fix to the .secrets.baseline
.
Let me know if you need help with that; easy enough for me to do! But I am curious how these Unicode escaped characters and --exclude-files
got named as patterns.
@@ -135,7 +135,8 @@ | |||
"venv", | |||
"dist", | |||
"build", | |||
".*\\.egg-info" | |||
".*\\.egg-info", | |||
"\u2018*.tfstate \\\n --exclude-files \u2018\\*.tfvars" |
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.
I'm seeing these \u2018
and --exclude-files
appear in your commits again.
Is there a chance there's some copy/paste problems going on? Some how, the command-line argument name itself --exclude-files
is being named as a pattern.
I believe what you want is:
{
"path": "detect_secrets.filters.regex.should_exclude_file",
"pattern": [
"\\.secrets..*",
"\\.git.*",
"\\.pre-commit-config\\.yaml",
"\\.mypy_cache",
"\\.pytest_cache",
"\\.tox",
"\\.venv",
"venv",
"dist",
"build",
".*\\.egg-info",
".*\\.tfstate",
".*\\.tfvars"
]
}
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.
@nutjob4life , what I used was:
$ detect-secrets scan --disable-plugin AbsolutePathDetectorExperimental
--exclude-files '.secrets..'
--exclude-files '.git.'
--exclude-files '.pre-commit-config.yaml'
--exclude-files '.mypy_cache'
--exclude-files '.pytest_cache'
--exclude-files '.tox'
--exclude-files '.venv'
--exclude-files 'venv'
--exclude-files 'dist'
--exclude-files 'build'
--exclude-files '.*.egg-info'
--exclude-files ‘*.tfstate'
--exclude-files ‘*.tfvars'
> .secrets.baseline
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.
Ah, I can see some problems all right.
First, the patterns are regexps, not glob expressions, so
--exclude-files '*.tfstate'
--exclude-files '*.tfvars'
should be
--exclude-files '.*\.tfstate' # Exclude files that start with zero-or-more characters and end with dot tfstate
--exclude-files '.*\.tfvars' # Exclude files that start with zero-or-more characters and end with dot tfvars
The same applies to all the other cases where .
appears; a .
in regexp, as you know, matches a single character, so you actually want
--exclude-files '\.pre-commmit-config.yaml'
--exclude-files '\.tox'
etc.
Second there are no continuation characters on your command-line; there should be a \
ending each line except the last, right?
But I found where the weird Unicode escape characters are coming from!
Look closely at this screenshot from your comment above:
![Screenshot 2025-02-12 at 5 38 01 PM](https://private-user-images.githubusercontent.com/814813/412656581-e276a289-3c97-4c5a-b949-a117e7db52d4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MTQ2NDQsIm5iZiI6MTczOTQxNDM0NCwicGF0aCI6Ii84MTQ4MTMvNDEyNjU2NTgxLWUyNzZhMjg5LTNjOTctNGM1YS1iOTQ5LWExMTdlN2RiNTJkNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwMjM5MDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZWE0NzYyZGYyZTVhZGFkZGY2MTQ4YjNhZmViZmNmNmRiZmEyZWRiYzk0MmFmMWE4ZDEyYjFiZmYxZGRiMmZhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ozptGjD7KByJSybmqy0pD9fV5x4GfvWnS7TnPDJpfnA)
The characters I circled in green are correct; those are APOSTROPHEs U+0027. But the characters in red are LEFT SINGLE QUOTATION MARKs, U+2018, which are incorrect. That explains why the literal text --exclude-files
is getting saved into the .secrets.baseline
.
Here is a detect-secrets scan
command you should be able to use:
detect-secrets scan --disable-plugin AbsolutePathDetectorExperimental \
--exclude-files '\.secrets\..*' \
--exclude-files '\.git.*' \
--exclude-files '\.pre-commit-config\.yaml' \
--exclude-files '\.mypy_cache' \
--exclude-files '\.pytest_cache' \
--exclude-files '\.tox' \
--exclude-files '\.venv' \
--exclude-files 'venv' \
--exclude-files 'dist' \
--exclude-files 'build' \
--exclude-files '.*\.egg-info' \
--exclude-files '.*\.tfstate' \
--exclude-files '.*\.tfvars' \
> .secrets.baseline
🗒️ Summary
Updates related to the MCP Prod deployment and code / document improvements
♻️ Related Issues
#90
Deploy Nucleus in Production env