Skip to content

Commit 80792fb

Browse files
committed
Harden repository for v1.3.0 beta
1 parent f271f2a commit 80792fb

71 files changed

Lines changed: 2948 additions & 1221 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = crlf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{yml,yaml,json,md,html,css,js}]
12+
end_of_line = lf
13+
indent_size = 2
14+
15+
[*.md]
16+
trim_trailing_whitespace = false
17+
18+
[*.cs]
19+
dotnet_sort_system_directives_first = true
20+
csharp_new_line_before_open_brace = all
21+
csharp_style_namespace_declarations = file_scoped:suggestion
22+
csharp_style_var_for_built_in_types = false:suggestion
23+
csharp_style_var_when_type_is_apparent = true:suggestion
24+
csharp_style_var_elsewhere = false:suggestion
25+
dotnet_style_qualification_for_field = false:suggestion
26+
dotnet_style_qualification_for_property = false:suggestion
27+
dotnet_style_qualification_for_method = false:suggestion
28+
dotnet_style_qualification_for_event = false:suggestion
29+
30+
[*.xaml]
31+
indent_size = 4

.gitattributes

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
* text=auto
2+
*.cs text eol=crlf
3+
*.csproj text eol=crlf
4+
*.sln text eol=crlf
5+
*.props text eol=crlf
6+
*.targets text eol=crlf
7+
*.ps1 text eol=crlf
8+
*.xaml text eol=crlf
9+
*.md text eol=lf
10+
*.yml text eol=lf
11+
*.yaml text eol=lf
12+
*.json text eol=lf
13+
*.html text eol=lf
14+
*.css text eol=lf
15+
*.js text eol=lf
16+
*.png binary
17+
*.jpg binary
18+
*.jpeg binary
19+
*.webp binary
20+
*.ico binary
21+
*.pdf binary
22+
*.scd text eol=lf
23+
*.icd text eol=lf
24+
*.cid text eol=lf
25+
*.pcap binary
26+
*.pcapng binary

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* @masarray
2+
/.github/ @masarray
3+
/src/ProcessBus.Iec61850.Raw/ @masarray
4+
/src/ProcessBus.App.Wpf/ @masarray
5+
/docs/ @masarray

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Bug report
2+
description: Report a reproducible runtime, protocol, UI, or packaging defect.
3+
title: "[Bug]: "
4+
labels: [bug, triage]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you. Remove customer/site identifiers before attaching logs, captures, screenshots, or SCL files.
10+
- type: input
11+
id: version
12+
attributes:
13+
label: Process Bus Insight version
14+
placeholder: 1.3.0-beta.1 or commit SHA
15+
validations:
16+
required: true
17+
- type: dropdown
18+
id: area
19+
attributes:
20+
label: Area
21+
options:
22+
- SV analyzer / waveform / phasor
23+
- GOOSE inspector
24+
- PTP / timing context
25+
- SCL validation
26+
- Capture / Npcap / adapter
27+
- Packaging / release
28+
- Documentation / website
29+
- Other
30+
validations:
31+
required: true
32+
- type: input
33+
id: environment
34+
attributes:
35+
label: Environment
36+
description: Windows version, Npcap version, adapter type, and capture path.
37+
placeholder: Windows 11 x64; Npcap 1.x; Intel NIC via TAP
38+
validations:
39+
required: true
40+
- type: textarea
41+
id: reproduce
42+
attributes:
43+
label: Reproduction steps
44+
placeholder: |
45+
1. Start capture...
46+
2. Select stream...
47+
3. Change publisher setting...
48+
validations:
49+
required: true
50+
- type: textarea
51+
id: expected
52+
attributes:
53+
label: Expected behavior
54+
validations:
55+
required: true
56+
- type: textarea
57+
id: actual
58+
attributes:
59+
label: Actual behavior
60+
validations:
61+
required: true
62+
- type: textarea
63+
id: evidence
64+
attributes:
65+
label: Sanitized evidence
66+
description: Screenshots, logs, SCL excerpt, or minimal PCAP. Do not include confidential data.
67+
- type: checkboxes
68+
id: checks
69+
attributes:
70+
label: Safety checks
71+
options:
72+
- label: I removed customer, site, IP, MAC, device, and project-sensitive information.
73+
required: true
74+
- label: I searched existing issues first.
75+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security vulnerability
4+
url: https://github.com/masarray/DigSubAnalyzer/security/advisories/new
5+
about: Report vulnerabilities privately. Do not open a public issue.
6+
- name: User documentation
7+
url: https://masarray.github.io/DigSubAnalyzer/
8+
about: Read setup, download, and product-scope guidance.

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Feature request
2+
description: Propose an evidence-focused improvement within the receive-only product boundary.
3+
title: "[Feature]: "
4+
labels: [enhancement, triage]
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: Engineering problem
10+
description: What FAT, SAT, commissioning, interoperability, or troubleshooting problem should this solve?
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: proposal
15+
attributes:
16+
label: Proposed behavior
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: evidence
21+
attributes:
22+
label: Validation approach
23+
description: Explain how the result can be verified without overclaiming timing accuracy.
24+
validations:
25+
required: true
26+
- type: checkboxes
27+
id: boundary
28+
attributes:
29+
label: Product boundary
30+
options:
31+
- label: This request keeps the product receive-only and does not add control or command workflows.
32+
required: true
33+
- label: Any example files or screenshots will be sanitized.
34+
required: true

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: nuget
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
time: "02:00"
9+
timezone: Asia/Jakarta
10+
open-pull-requests-limit: 5
11+
labels:
12+
- dependencies
13+
- dotnet
14+
15+
- package-ecosystem: github-actions
16+
directory: /
17+
schedule:
18+
interval: monthly
19+
day: monday
20+
time: "02:30"
21+
timezone: Asia/Jakarta
22+
open-pull-requests-limit: 5
23+
labels:
24+
- dependencies
25+
- github-actions

.github/pull_request_template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Engineering intent
2+
3+
Describe the FAT/SAT, commissioning, interoperability, troubleshooting, or repository-quality problem addressed by this change.
4+
5+
## What changed
6+
7+
-
8+
9+
## Validation
10+
11+
- [ ] `dotnet restore .\ProcessBusSuite.sln`
12+
- [ ] `dotnet build .\ProcessBusSuite.sln -c Release --no-restore`
13+
- [ ] `dotnet test .\ProcessBusSuite.sln -c Release --no-build`
14+
- [ ] `pwsh .\scripts\repository-health.ps1`
15+
- [ ] Runtime smoke test on Windows, when runtime behavior changed
16+
- [ ] Documentation/screenshots updated when user-visible behavior changed
17+
18+
## Safety and evidence
19+
20+
- [ ] Receive-only product boundary is preserved
21+
- [ ] Timing language matches timestamp-source confidence
22+
- [ ] No customer, site, device, MAC/IP, capture, SCL, or project-sensitive data is included
23+
- [ ] No `bin`, `obj`, `artifacts`, logs, captures, or local settings are committed
24+
25+
## Compatibility / migration notes
26+
27+
None, or describe them here.

.github/workflows/ci.yml

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,27 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
workflow_dispatch:
99

1010
permissions:
1111
contents: read
1212

13+
concurrency:
14+
group: ci-${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
env:
18+
DOTNET_NOLOGO: true
19+
DOTNET_CLI_TELEMETRY_OPTOUT: true
20+
1321
jobs:
14-
build:
15-
name: Restore and build
22+
build-test:
23+
name: Build, test, and repository health
1624
runs-on: windows-latest
25+
timeout-minutes: 25
1726

1827
steps:
1928
- name: Checkout
@@ -24,23 +33,30 @@ jobs:
2433
with:
2534
dotnet-version: 8.0.x
2635

36+
- name: Repository health gate
37+
shell: pwsh
38+
run: .\scripts\repository-health.ps1
39+
2740
- name: Restore
2841
run: dotnet restore .\ProcessBusSuite.sln
2942

3043
- name: Build
3144
run: dotnet build .\ProcessBusSuite.sln -c Release --no-restore /p:ContinuousIntegrationBuild=true
3245

33-
- name: Run tests when present
34-
shell: pwsh
35-
run: |
36-
$testProjects = Get-ChildItem -Path . -Recurse -Filter *.csproj |
37-
Where-Object { $_.FullName -match '(Test|Tests)\\|\.(Test|Tests)\.csproj$' }
38-
39-
if (-not $testProjects) {
40-
Write-Host "No test project found. Build validation completed."
41-
exit 0
42-
}
43-
44-
foreach ($project in $testProjects) {
45-
dotnet test $project.FullName -c Release --no-build --logger "trx"
46-
}
46+
- name: Test with coverage
47+
run: >-
48+
dotnet test .\ProcessBusSuite.sln
49+
-c Release
50+
--no-build
51+
--logger "trx;LogFileName=tests.trx"
52+
--results-directory .\TestResults
53+
--collect "XPlat Code Coverage"
54+
55+
- name: Upload test evidence
56+
if: always()
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: test-evidence-${{ github.run_id }}
60+
path: TestResults/**
61+
if-no-files-found: warn
62+
retention-days: 14

.github/workflows/codeql.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: "17 3 * * 1"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
security-events: write
15+
packages: read
16+
17+
concurrency:
18+
group: codeql-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
env:
22+
DOTNET_NOLOGO: true
23+
DOTNET_CLI_TELEMETRY_OPTOUT: true
24+
25+
jobs:
26+
analyze:
27+
name: Analyze C#
28+
runs-on: windows-latest
29+
timeout-minutes: 35
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Setup .NET
36+
uses: actions/setup-dotnet@v4
37+
with:
38+
dotnet-version: 8.0.x
39+
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@v3
42+
with:
43+
languages: csharp
44+
build-mode: manual
45+
46+
- name: Restore
47+
run: dotnet restore .\ProcessBusSuite.sln
48+
49+
- name: Build
50+
run: dotnet build .\ProcessBusSuite.sln -c Release --no-restore /p:ContinuousIntegrationBuild=true
51+
52+
- name: Analyze
53+
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)