Skip to content

Commit d39ab9f

Browse files
authored
Update to release strings and formatting, small fixes (#720)
* fix: spinner text info for baseline migration * fix: update CURRENT_USER discovery change method to use the loginwindow.plist instead of console * refactor: release string and format * chore: correct reference to changelog Issue #718
1 parent 7bac440 commit d39ab9f

7 files changed

Lines changed: 10 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Civilian agencies are to use the National Checklist Program as required by [NIST
7575

7676
## Changelog
7777

78-
Refer to the [CHANGELOG](CHANGELOG.md) for a complete list of changes.
78+
Refer to the [CHANGELOG](CHANGELOG.adoc) for a complete list of changes.
7979

8080
## NIST Disclaimer
8181

src/mscp/common_utils/version_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def get_version_data(
7878
)
7979
else:
8080
match["compliance_version"] = (
81-
f"{OS_NAME_MAP.get(match['os_name'].lower(), match['os_name'])} Guidance, Revision {mscp_data['mscp'].get('version')}"
81+
f"mSCP Release {mscp_data['mscp'].get('release')}"
8282
)
8383

8484
return match

src/mscp/data/includes/mscp-data.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ mscp:
33
version: '2.0'
44
build: 30
55
build_date: '2026-06-11'
6-
release_date: '2026-12-12'
6+
release_date: '2026-XX-XX'
7+
release: '27.0'
78
ddm:
89
services:
910
com.apple.bash: /etc/

src/mscp/data/rules/os/os_show_filename_extensions_enable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ discussion: |
88
The check and fix are for the currently logged in user. To get the currently logged in user, run the following.
99
[source,bash]
1010
----
11-
CURRENT_USER=$( /usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | /usr/bin/awk '/Name :/ && ! /loginwindow/ { print $3 }' )
11+
CURRENT_USER=$( /usr/bin/defaults read /Library/Preferences/com.apple.loginwindow lastUserName )
1212
----
1313
====
1414
references:

src/mscp/data/templates/shell_scripts/compliance_script.sh.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
# MSCP COMPLIANCE SCRIPT BUILD INFORMATION
1616
#
17-
# MSCP RELEASE: {{ mscp_release }}
17+
# RELEASE: {{ mscp_release }}
1818
# BASELINE: {{ baseline_name }}
1919
# DATE: {{ todays_date }}
2020
#
@@ -70,7 +70,7 @@ fi
7070
plb="/usr/libexec/PlistBuddy"
7171

7272
# get the currently logged in user and hostname
73-
CURRENT_USER=$( /usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | /usr/bin/awk '/Name :/ && ! /loginwindow/ { print $3 }')
73+
CURRENT_USER=$( /usr/bin/defaults read /Library/Preferences/com.apple.loginwindow lastUserName )
7474
CURR_USER_UID=$(/usr/bin/id -u $CURRENT_USER)
7575
CURR_HOSTNAME=$(/usr/sbin/scutil --get HostName)
7676

src/mscp/data/templates/shell_scripts/restore_script.sh.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
# MSCP COMPLIANCE SCRIPT BUILD INFORMATION
1616
#
17-
# MSCP RELEASE: {{ mscp_release }}
17+
# RELEASE: {{ mscp_release }}
1818
# BASELINE: {{ baseline_name }}
1919
# DATE: {{ todays_date }}
2020
#
@@ -67,7 +67,7 @@ fi
6767
plb="/usr/libexec/PlistBuddy"
6868

6969
# get the currently logged in user
70-
CURRENT_USER=$( /usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | /usr/bin/awk '/Name :/ && ! /loginwindow/ { print $3 }')
70+
CURRENT_USER=$( /usr/bin/defaults read /Library/Preferences/com.apple.loginwindow lastUserName )
7171
CURR_USER_UID=$(/usr/bin/id -u $CURRENT_USER)
7272

7373
# get system architecture

src/mscp/generate/baseline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def generate_baseline(
270270
"""
271271
sp.spinner = Spinners.dots
272272
if getattr(args, "migrate", None):
273-
sp.text("Migrating baseline from 1.0")
273+
sp.text = "Migrating baseline from legacy MSCP"
274274
migrate_legacy_baseline(args)
275275
return
276276

0 commit comments

Comments
 (0)