-
Notifications
You must be signed in to change notification settings - Fork 7
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
Inclui novas variáveis de ambiente. #196
base: master
Are you sure you want to change the base?
Conversation
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
13840232 | Triggered | Generic High Entropy Secret | ff66c41 | .envs/.production-template/.flask | View secret |
13840232 | Triggered | Generic High Entropy Secret | b51f7f6 | .envs/.production-template/.flask | View secret |
13840232 | Triggered | Generic High Entropy Secret | 7df7246 | .envs/.production-template/.flask | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
@samuelveigarangel @robertatakenaka sobre essa atividade tenho dúvida sobre a definição dela, me explico: É para termos todas as variáveis de ambientes na pasta .envs? ou é para termos as variáveis mais utilizadas? De fato olhando o PR e olhando os arquivos não temos todas as variáveis de ambiente no diretório .envs, exemplo:
Esse é um exemplo de variável que deve está em .envs pensado nos países é uma variável que deve ser trocada, cada país deve term sua conta de recaptcha. A variável DEFAULT_EMAIL e OPAC_EMAIL_ACCOUNTS_RECEIVE_ERRORS são outros exemplos. Sugiro que todos as variáveis de ambiente estejam nesses arquivos da pasta .envs ou tenha um cabeçalho que indica as variáveis, assim com existe no arquivo default.py que indicar todas as variáveis de ambiente possíveis. Vejam: https://github.com/scieloorg/opac_5/blob/master/opac/webapp/config/default.py#L6 |
.envs/.production-template/.flask
Outdated
@@ -21,12 +21,24 @@ OPAC_SECRET_KEY=NWhWFn_ScpW6YR9yJKDLxg | |||
# Name for MongoDB host | |||
OPAC_MONGODB_HOST=opac_mongo | |||
|
|||
# Activate/Desactivate the cache of redis (default: True) | |||
# Activate/Desactivate the cache of redis (default: False) |
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.
Show.
docker-compose.yml
Outdated
- ./.envs/.production-template/.flask | ||
- ./.envs/.production-template/.redis | ||
- ./.envs/.production-template/.monitoring-apm | ||
- ./.envs/.production-template/.metrics |
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.
@samuelveigarangel manter .production
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.
@samuelveigarangel o .envs/.production-template
é para que ao baixar não sobrescreva o .envs/.production
existente
|
||
# ORCID URL. default: http://orcid.org/ | ||
OPAC_ORCID_URL=http://orcid.org/ | ||
# enables/disables the presentation of collection metrics data (default: False). Possible values: True or False |
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.
@samuelveigarangel adicionar o conteúdo de .metrics
para .flask
. Como .metrics
e .server
não são aplicações, a configuração deveria estar em .flask
. @gitnnolabs o que acha?
@samuelveigarangel variáveis duplicadas, remover do redis:
|
.envs/.production-template/.redis
Outdated
OPAC_CACHE_CONTROL_MAX_AGE_HEADER=604800 | ||
|
||
|
||
OPAC_FORCE_USE_HTTPS_GOOGLE_TAGS |
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.
@samuelveigarangel faltou o = com o valor default
.envs/.production-template/.server
Outdated
@@ -4,6 +4,30 @@ | |||
# This set the IP that the app will bind to run, default: 0.0.0.0 | |||
OPAC_SERVER_NAME=0.0.0.0 | |||
|
|||
# Domain for the session cookie (default: OPAC_SERVER_NAME) | |||
OPAC_SESSION_COOKIE_DOMAIN=OPAC_SERVER_NAME |
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.
@samuelveigarangel o valor default não pode ser OPAC_SERVER_NAME
@@ -0,0 +1,15 @@ | |||
# -------------------- Twitter ---------------------- |
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.
@samuelveigarangel mover estas variáveis para o .flask
O que esse PR faz?
Incluí novas váriaveis de ambiente.
Onde a revisão poderia começar?
Indique o caminho do arquivo e o arquivo onde o revisor deve iniciar a leitura do código.
Como este poderia ser testado manualmente?
Estabeleça os passos necessários para que a funcionalidade seja testada manualmente pelo revisor.
Algum cenário de contexto que queira dar?
De acordo com Readme do projeto opac_5, foi incluído novas variáveis.
Screenshots
N/A
Quais são tickets relevantes?
#184
#206
Referências
N/A