Skip to content
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

Bump to version 0.1.2-a #3

Merged
merged 3 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gemini-python/gemini_self_protector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.1.2-a (21/07/2023)

- Fix bug is_valid_license_key method not found

## v0.1.2 (12/07/2023)

- Update for work with new predict server
Expand Down
2 changes: 1 addition & 1 deletion gemini-python/gemini_self_protector/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gemini_self_protector"
version = "0.1.2"
version = "0.1.2-a"
description = "Runtime Application Self-Protection"
authors = ["lethanhphuc"]
license = "MIT"
Expand Down
243 changes: 136 additions & 107 deletions gemini-python/gemini_self_protector/src/gemini_self_protector/_gui.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ def validate_protect_mode(protect_mode) -> None:
:return: a boolean value.
"""
try:
arr_mode = ['off', 'block', 'monitor']
arr_mode = ['off', 'protection', 'monitor']
if protect_mode in arr_mode:
return True
else:
logger.error(
"[x_x] Invalid Protect Mode. Protect mode must be: monitor - block - off")
"[x_x] Invalid Protect Mode. Protect mode must be: monitor - protection - off")
return False
except Exception as e:
logger.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ <h5>Configurate</h5>
for="protect-mode-monitor">Monitor</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="protect-mode-block" name="protect_mode"
value="block" class="custom-control-input" {% if
_protect_mode=='block' %}checked{% endif %}>
<input type="radio" id="protect-mode-protection" name="protect_mode"
value="protection" class="custom-control-input" {% if
_protect_mode=='protection' %}checked{% endif %}>
<label class="custom-control-label"
for="protect-mode-block">Block</label>
for="protect-mode-protection">Protection</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="protect-mode-off" name="protect_mode"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h2 class="mt-3 f-w-300">{{_protect_mode|title}}<sub
{% if _protect_mode == 'monitor' %}
<h6 class="text-muted mt-4 mb-0">Gemini is monitoring all requests</h6>
<i class="fa fa-binoculars text-c-purple f-50"></i>
{% elif _protect_mode == 'block' %}
{% elif _protect_mode == 'protection' %}
<h6 class="text-muted mt-4 mb-0">Gemini is blocking abnormal requests</h6>
<i class="fas fa-ban text-c-purple f-50"></i>
{% else %}
Expand Down Expand Up @@ -492,7 +492,7 @@ <h5>Event Description</h5>
url: "{{url_for('nested_service.gemini_event_feedback')}}",
method: 'POST',
contentType: 'application/json',
data: JSON.stringify({ event_id: eventId, feedback_value: 0 }),
data: JSON.stringify({ event_id: eventId, feedback_value: 1 }),
success: function (data) {
Toastify({
text: "Update feedback successful",
Expand Down Expand Up @@ -529,7 +529,7 @@ <h5>Event Description</h5>
url: "{{url_for('nested_service.gemini_event_feedback')}}",
method: 'POST',
contentType: 'application/json',
data: JSON.stringify({ event_id: eventId, feedback_value: 1 }),
data: JSON.stringify({ event_id: eventId, feedback_value: 0 }),
success: function (data) {
Toastify({
text: "Update feedback successful",
Expand Down