Skip to content

Commit 1875c09

Browse files
Merge pull request #182 from sei-vsarvepalli/version-3.0.21
Updates staged from 3.0.14 to version 3.0.21
2 parents c55d9c9 + eb5fa95 commit 1875c09

24 files changed

Lines changed: 1321 additions & 180 deletions

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,55 @@
33
CHANGELOG
44
VINCE Coordination platform code
55

6+
7+
## Description
8+
VINCE Coordination platform code
9+
10+
Version 3.0.21 2025-06-30
11+
12+
* updated numerous links to CVD documentation, etc. (Internal-816)
13+
* added logging for the authentication process (Internal-817)
14+
* modified specifications for spreadsheet used for detailed weekly reports to CISA (Internal-804)
15+
16+
17+
Version 3.0.20 2025-06-11
18+
19+
* fixed bug affecting redirect after editing case vulnerability information (Internal-810)
20+
* added filtering for the Edit Case form to prevent inactive users from appearing as potential case owners (Internal-811)
21+
* reinstated API endpoints turned off in last release; added database model for logging certain API endpoint access events (Internal-812)
22+
* dependabot update recommendations: `django` 4.2.21 to 4.2.22, `requests` 2.32.0 to 2.32.4
23+
24+
25+
Version 3.0.19 2025-05-06
26+
27+
* Turned off certain API endpoints for security review (Internal-807)
28+
* Updated code for CSV files in response to user requests for more fine-grained information (Internal-804)
29+
* Updated link to VINCE Documentation (Internal-808)
30+
31+
32+
Version 3.0.18 2025-04-17
33+
34+
* Updated code for CSV files in reponse to even more user requests for more fine-grained information (Internal-804)
35+
36+
37+
Version 3.0.17 2025-04-17
38+
39+
* Updated code for CSV files in reponse to user requests for more fine-grained information (Internal-804)
40+
41+
42+
Version 3.0.16 2025-04-17
43+
44+
* dependabot update recommendations: `Django` 4.2.17 to 4.2.20, `python-jose` 3.3.0 to 3.4.0
45+
* Fixed bug preventing certain users from changing their passwords (Internal-800)
46+
* Tweaked logs for Internal-791
47+
* Added code for CSV files to support preparation of reports for CISA (Internal-804)
48+
49+
50+
Version 3.0.15 2025-03-17
51+
52+
* Modified code for checking authenticity so as to include extra logs and to bypass false negatives (Internal-791)
53+
54+
655
Version 3.0.14 2025-03-17
756

857
* Added code for checking authenticity of emails subject to new preprocessing for AWS email integration (Internal-791)

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Mellon University.
1313

1414
* The CERT Guide to Coordinated Vulnerability Disclosure: [https://vuls.cert.org/confluence/display/CVD](https://vuls.cert.org/confluence/display/CVD)
1515
* Report a Vulnerability [https://www.kb.cert.org/vuls/report/](https://www.kb.cert.org/vuls/report/)
16-
* VINCE User Documentation: [https://vuls.cert.org/confluence/display/VIN/VINCE+Documentation](https://vuls.cert.org/confluence/display/VIN/VINCE+Documentation)
17-
* Vulnerability Note API Documentation: [https://vuls.cert.org/confluence/display/VIN/Vulnerability+Note+API](https://vuls.cert.org/confluence/display/VIN/Vulnerability+Note+API)
18-
* VINCE API Documentation: [https://vuls.cert.org/confluence/display/VIN/VINCE+API](https://vuls.cert.org/confluence/display/VIN/VINCE+API)
16+
* VINCE User Documentation: [https://certcc.github.io/VINCE-docs/](https://certcc.github.io/VINCE-docs/)
17+
* Vulnerability Note API Documentation: [https://certcc.github.io/VINCE-docs/Vulnerability-Note-API/](https://certcc.github.io/VINCE-docs/Vulnerability-Note-API/)
18+
* VINCE API Documentation: [https://certcc.github.io/VINCE-docs/VINCE-API/](https://certcc.github.io/VINCE-docs/VINCE-API/)
1919

2020
### Bugs and Feature Requests
2121

@@ -74,7 +74,6 @@ reduce the risk of exposure.
7474
[<img src="https://github.com/CERTCC/VINCE/raw/main/Vince_Infrastructure.png" width="100%"></A>](https://github.com/CERTCC/VINCE/raw/main/Vince_Infrastructure.png)
7575

7676

77-
7877
### Local Install
7978

8079
1. Clone the repo

bigvince/settings_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
ROOT_DIR = environ.Path(__file__) - 3
5555

5656
# any change that requires database migrations is a minor release
57-
VERSION = "3.0.14"
57+
VERSION = "3.0.21"
5858

5959
# Quick-start development settings - unsuitable for production
6060
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/

cogauth/backend.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class CognitoAuthenticate(ModelBackend):
134134
def authenticate(self, request, username=None, password=None):
135135
ip = vinceutils.get_ip(request)
136136
if username and password:
137+
logger.debug(f"CognitoAuthenticate is running with username {username}")
137138
cognito_user = CognitoUser(
138139
settings.COGNITO_USER_POOL_ID,
139140
settings.COGNITO_APP_ID,
@@ -147,17 +148,20 @@ def authenticate(self, request, username=None, password=None):
147148
logger.debug(f"trying to authenticate {username} from IP {ip}")
148149
cognito_user.authenticate(password)
149150
except ForceChangePasswordException:
151+
logger.debug(f"ForceChangePasswordException when trying to authenticate {username} from IP {ip}")
150152
request.session["FORCEPASSWORD"] = True
151153
request.session["username"] = username
152154
return None
153155
except SoftwareTokenException as e:
156+
logger.debug(f"SoftwareTokenException {e} when trying to authenticate {username} from IP {ip}")
154157
request.session["MFAREQUIRED"] = "SOFTWARE_TOKEN_MFA"
155158
request.session["username"] = username
156159
request.session["MFASession"] = cognito_user.session
157160
request.session["DEVICE_NAME"] = str(e)
158161
request.session.save()
159162
return None
160163
except SMSMFAException:
164+
logger.debug(f"SMSMFAException when trying to authenticate {username} from IP {ip}")
161165
request.session["MFAREQUIRED"] = "SMS_MFA"
162166
request.session["username"] = username
163167
request.session["MFASession"] = cognito_user.session
@@ -194,6 +198,7 @@ def authenticate(self, request, username=None, password=None):
194198
# emails for username - so get email and return CognitoUser
195199
email = list(filter(lambda email: email["Name"] == "email", user["UserAttributes"]))[0]["Value"]
196200
username = email
201+
logger.debug(f"CognitoAuthenticate is running on an ACCESS_TOKEN. username is {username}")
197202
cognito_user = CognitoUser(
198203
settings.COGNITO_USER_POOL_ID,
199204
settings.COGNITO_APP_ID,
@@ -207,6 +212,9 @@ def authenticate(self, request, username=None, password=None):
207212
cognito_user.refresh_token = request.session["REFRESH_TOKEN"]
208213

209214
else:
215+
logger.debug(
216+
"CognitoAuthenticate is running, but it has not found a username/password pair or an ACCESS_TOKEN."
217+
)
210218
headers = {"Content-Type": "application/x-www-form-urlencoded"}
211219
data = {
212220
"grant_type": "authorization_code",
@@ -237,6 +245,9 @@ def authenticate(self, request, username=None, password=None):
237245
)
238246
user = client.get_user(AccessToken=access_token)
239247
username = user["Username"]
248+
logger.debug(
249+
f"CognitoAuthenticate is running, but it has not found a username/password pair or an ACCESS_TOKEN. Nevertheless, username has been found to be {username}"
250+
)
240251
cognito_user = CognitoUser(
241252
settings.COGNITO_USER_POOL_ID,
242253
settings.COGNITO_APP_ID,

cogauth/views.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ def form_valid(self, form):
838838
self.request.session["ACCESS_TOKEN"] = tokens["AuthenticationResult"]["AccessToken"]
839839
user = authenticate(self.request, username=self.request.session["username"])
840840
if user:
841+
logger.debug(f"user {user} is trying to use the MFA Required screen")
841842
del self.request.session["username"]
842843
auth_login(self.request, user)
843844
self.cognito = get_cognito(self.request)
@@ -863,8 +864,10 @@ def form_valid(self, form):
863864
logger.debug(f"NEXT URL provided by GET request {next_url}")
864865
try:
865866
if is_safe_url(next_url, set(settings.ALLOWED_HOSTS), True):
867+
logger.debug(f"{user} wants to access {next_url}, and it has been found to be safe")
866868
return redirect(next_url)
867869
else:
870+
logger.debug(f"{user} wants to access {next_url}, and it has not been found to be safe")
868871
return redirect(settings.LOGIN_REDIRECT_URL)
869872
except Exception as e:
870873
logger.debug(f"Error in redirection validator {e}")
@@ -1004,14 +1007,16 @@ def form_valid(self, form):
10041007
ip = vinceutils.get_ip(self.request)
10051008
try:
10061009
c.change_password(form.cleaned_data["old_password"], form.cleaned_data["new_password1"])
1007-
logger.info(f"Password was updated for {self.request.username} from IP {ip}")
1010+
logger.info(f"Password was updated for {self.request.user.username} from IP {ip}")
10081011
except ParamValidationError:
1009-
logger.info(f"Password updated failed for {self.request.username} from IP {ip} - invalid new password")
1012+
logger.info(
1013+
f"Password updated failed for {self.request.user.username} from IP {ip} - invalid new password"
1014+
)
10101015
form._errors.setdefault("new_password1", ErrorList(["New password is unacceptable."]))
10111016
return super().form_invalid(form)
10121017
except (Boto3Error, ClientError) as e:
10131018
error_code = e.response["Error"]["Code"]
1014-
logger.info(f"Password updated failed for {self.request.username} from IP {ip} - {e} {error_code}")
1019+
logger.info(f"Password updated failed for {self.request.user.username} from IP {ip} - {e} {error_code}")
10151020
if error_code == "NotAuthorizedException":
10161021
form._errors.setdefault("old_password", ErrorList(["Password is incorrect."]))
10171022
return super().form_invalid(form)

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cryptography==44.0.1
2424
cvelib==1.3.0
2525
Deprecated==1.2.13
2626
dictdiffer==0.9.0
27-
Django==4.2.17
27+
Django==4.2.22
2828
django-appconf==1.0.5
2929
django-countries==7.4.2
3030
django-environ==0.9.0
@@ -63,12 +63,12 @@ pyparsing==3.0.9
6363
pyrsistent==0.19.2
6464
python-dateutil==2.8.2
6565
python-gnupg==0.5.0
66-
python-jose==3.3.0
66+
python-jose==3.4.0
6767
pytz==2022.6
6868
PyYAML==5.4.1
6969
qrcode==7.3.1
7070
redis==4.5.4
71-
requests==2.32.0
71+
requests==2.32.4
7272
rsa==4.7.2
7373
s3transfer==0.6.0
7474
segno==1.5.2

vince/forms.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,10 +1699,15 @@ class Meta:
16991699
def get_group_choices(self, user):
17001700
return [(q.id, q.name) for q in user.groups.exclude(groupsettings__contact__isnull=True)]
17011701

1702+
def get_owner_choices(self):
1703+
1704+
return [(u.id, u.email) for u in User.objects.using("default").filter(is_active=True)]
1705+
17021706
def __init__(self, *args, **kwargs):
17031707
user = kwargs.pop("user")
17041708
super(EditCaseForm, self).__init__(*args, **kwargs)
17051709
self.fields["team_owner"].choices = self.get_group_choices(user)
1710+
self.fields["owner"].choices = self.get_owner_choices()
17061711

17071712

17081713
class AssignTicketTeamForm(forms.Form):

vince/lib.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,7 @@ def verify_authenticity_header(msg, key, headers):
23642364
match = hmac.compare_digest(value, expected_value)
23652365
if not match:
23662366
logger.warn(
2367-
"match did not happen correctly. expected_value is {expected_value} and actual value is {value}"
2367+
f"match did not happen correctly. expected_value is {expected_value} and actual value is {value}"
23682368
)
23692369
return match
23702370

@@ -3152,6 +3152,8 @@ def prepare_and_send_weekly_report():
31523152
week = oneweekago.isocalendar()[1]
31533153
weekstartdate = date.fromisocalendar(year, week, 1)
31543154
weekenddate = date.fromisocalendar(year, week, 7)
3155+
# for testing:
3156+
# daterangeend = datetime.now()
31553157
daterangeend = weekenddate + timedelta(days=1)
31563158

31573159
# examine the GroupSettings model, looking for groups that have weekly="on"
@@ -3178,6 +3180,7 @@ def prepare_and_send_weekly_report():
31783180
ticket__queue__in=my_queues,
31793181
).exclude(ticket__case__isnull=False)
31803182
tickets = Ticket.objects.filter(queue__in=my_queues, created__range=[weekstartdate, daterangeend])
3183+
logger.debug(f"when processing the weekly report data, tickets is found to be {tickets}")
31813184
closed_tickets = tickets.filter(status=Ticket.CLOSED_STATUS)
31823185
new_cases = VulnerabilityCase.objects.filter(
31833186
created__range=[weekstartdate, daterangeend], team_owner=my_team
@@ -3219,6 +3222,8 @@ def prepare_and_send_weekly_report():
32193222
"case_emails_distinct": case_emails.order_by("ticket__case__id").distinct("ticket__case__id").count(),
32203223
"total_emails": ticket_emails.count() + case_emails.count(),
32213224
"total_tickets": tickets.count(),
3225+
"tickets": tickets,
3226+
"closed_tickets": closed_tickets,
32223227
"ticket_stats": tickets.values("queue__title")
32233228
.order_by("queue__title")
32243229
.annotate(count=Count("queue__title"))
@@ -3247,15 +3252,7 @@ def prepare_and_send_weekly_report():
32473252
),
32483253
}
32493254

3250-
logger.debug("context complete")
3251-
logger.debug("weeklyreport context is")
3252-
logger.debug(context)
3253-
3254-
# # This is just for testing:
3255-
# # weekstartdate = date.today()
3256-
# # daterangeend = weekstartdate + timedelta(days=1)
3257-
# # context['weekstartdate'] = weekstartdate
3258-
# # context['weekenddate'] = weekstartdate + timedelta(days=1)
3255+
logger.debug(f"weeklyreport context is {context}")
32593256

32603257
if groupid == 1:
32613258
total_ai_ml_crs = (

vince/templates/vince/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ <h6>Vulnerability INformation and Coordination Environment</h6></span>-->
307307
<div>© {% now "Y" %} Carnegie Mellon University</div>
308308
</li>
309309
<li><div><a href="https://vuls.cert.org/confluence/display/Wiki/Vulnerability+Disclosure+Policy" target="_blank" rel="noopener">Disclosure Policy</a></div></li>
310-
<li><div><a href="https://vuls.cert.org/confluence/display/VIN/VINCE+Code+of+Conduct#VINCECodeofConduct-TermsofUse" target="_blank" rel="nopener">Terms of Use</a></div></li>
310+
<li><div><a href="https://certcc.github.io/VINCE-docs/VINCE-Code-of-Conduct/" target="_blank" rel="nopener">Terms of Use</a></div></li>
311311
<li><div><span class="font-weight-bold">V.{{ VERSION }}</span></div></li>
312312
</ul>
313313
</div>

vince/templates/vince/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="row">
77
<div class="columns small-12 medium-8 large-8">
88
<h1>VINCE</h1>
9-
<p class="lead-body">Welcome to the Vulnerability Information and Coordination Environment (VINCE). If you are a vendor and would like to communicate with us about a vulnerability or update your contact information, please create an account or sign in. You can also <a href="{% url 'vincepub:initreport' %}">report a vulnerability</a> to us, with or without a VINCE account. </a>
9+
<p class="lead-body">Welcome to the Vulnerability Information and Coordination Environment (VINCE). If you are a vendor and would like to communicate with us about a vulnerability or update your contact information, please create an account or sign in. You can also <a href="{% url 'vincepub:initreport' %}">report a vulnerability</a> to us, with or without a VINCE account. For more information see the <a href="https://certcc.github.io/VINCE-docs/">VINCE Documentation</a> site.</p></a>
1010
</div>
1111
<div class="columns small-12 medium-4 large-4 vince-index">
1212
<a href="{% url 'cogauth:register' %}" class="vulcontact button expanded">Create an Account</a>

0 commit comments

Comments
 (0)