-
Notifications
You must be signed in to change notification settings - Fork 1
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
Configure DNS #85
base: main
Are you sure you want to change the base?
Configure DNS #85
Conversation
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.
Hey @yusancky - I've reviewed your changes and found some issues that need to be addressed.
Blocking issues:
- Potential undefined variable 'title' in the exception handling block. (link)
- Hard-coded username detected. (link)
- Proper use of secrets for BOT_PASSWORD. (link)
Here's what I looked at during the review
- 🔴 General issues: 1 blocking issue
- 🔴 Security: 2 blocking issues
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Docstrings: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
def push(content : str): | ||
if MAIN_REPO_BRANCH() or PR_TEST(): | ||
try: | ||
wiki = Wiki('sat.huijiwiki.com', '雨伞CKY', environ['BOT_PASSWORD']) | ||
wiki.edit('模板:AllUp',content,'Edit via AllUp-Satwiki') | ||
except: | ||
open(f'{title}.wikitext', 'w').write(content) |
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.
issue (bug_risk): Potential undefined variable 'title' in the exception handling block.
The variable 'title' is used in the exception handling block but it's not defined within the scope of the new push
function. Consider passing 'title' as an argument to the function or handling the exception differently.
- name: Main | ||
run: python main.py | ||
env: | ||
BOT_PASSWORD: ${{ secrets.BOT_PASSWORD }} |
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.
🚨 issue (security): Proper use of secrets for BOT_PASSWORD.
Good practice to use GitHub secrets for sensitive information. Ensure the secret is managed securely.
try: | ||
wiki = Wiki('sat.huijiwiki.com', '雨伞CKY', environ['BOT_PASSWORD']) | ||
wiki.edit('模板:AllUp',content,'Edit via AllUp-Satwiki') | ||
except: |
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.
suggestion (code-quality): Use except Exception:
rather than bare except:
(do-not-use-bare-except
)
except: | |
except Exception: |
No description provided.