windows_baseline.dsc.yaml is using deprecated Microsoft.DSC metadata

Đang mở Phù hợp với người mới
#1,831 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust, yaml
Lĩnh vực
devops

Hướng nghiên cứu

Đọc configurations/windows/windows_baseline.dsc.yaml và so sánh metadata của tệp với hướng dẫn về việc ngừng hỗ trợ trong issue #1369 và câu hỏi về schema được nêu trong #1673. Chạy dsc config get --file windows_baseline.dsc.yaml để xác nhận cảnh báo, sau đó xác minh rằng mẫu đã cập nhật chạy mà không có cảnh báo khi dùng schema và ngữ cảnh bảo mật phù hợp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Issue-Bug Need-Review
Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Summary

Usage of the Microsoft.DSC metadata has been deprecated after issue #1369.
The windows_baseline.dsc.yaml file still uses it, and issues a warning when run.
Provided samples shouldn't be using deprecated features.
Tested om 3.3.0 and 3.4.0-preview.3

https://github.com/PowerShell/DSC/blob/57d1ad87713cfc55883c0c7ecc38ad6f5aacb5cb/configurations/windows/windows_baseline.dsc.yaml#L1-L5

The fix is very easy, but I've not yet created a pull request, because I think it should be using a newer schema?
But issue #1673 complicates things/confuses me. Maybe I should just create a pull request and wait for the feedback.

# This configuration validates a Windows system against a security baseline configuration
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
directives:
  securityContext: elevated
Steps to reproduce
  1. run the following command:
dsc config get --file windows_baseline.dsc.yaml
Expected behavior
no warnings
Actual behavior
2026-11-26T03:07:03.201409Z  WARN Using 'Microsoft.DSC' metadata to specify required security context is deprecated. Please use the 'securityContext' directive in the configuration document instead.  See https://github.com/PowerShell/DSC/issues/1369 for more details.
Error details

Environment data
Name                           Value
----                           -----
PSVersion                      7.7.0
PSEdition                      Core
GitCommitId                    7.7.0
OS                             Microsoft Windows 10.0.26300
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Version

dsc 3.3.0

Visuals

No response

Ngôn ngữ chính
Rust
Star
546
Fork
84
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/DSC

Tất cả issue của PowerShell/DSC

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.