Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
07d9592
feat(md-autofix): scaffold script with detection functions and tests
hilram7 Apr 6, 2026
98bd264
feat(md-autofix): add link rewriting function with tests
hilram7 Apr 6, 2026
f174618
feat(md-autofix): implement main loop and JSON output
hilram7 Apr 6, 2026
b5f218f
feat(md-autofix): add workflow to auto-fix missing .md extensions on PRs
hilram7 Apr 6, 2026
14eaf0e
fix(docs): add .md extension and frontmatter to fs_sdd_delete (access…
hilram7 Apr 6, 2026
b5ba6e1
fix(md-autofix): use mv + git add instead of git mv to support untrac…
hilram7 Apr 6, 2026
7223cf5
chore: remove test files from md-autofix local testing
hilram7 Apr 6, 2026
a95397a
Merge branch 'dev' into feature/md-extension-autofix
hilram7 Apr 6, 2026
c16e85d
fix(vale): auto-fix substitutions and removals
github-actions[bot] Apr 6, 2026
673f19c
fix(vale): auto-fix rewrites (AI-assisted)
github-actions[bot] Apr 6, 2026
ad5acb6
fix(dale): auto-fix documentation issues (AI-assisted)
github-actions[bot] Apr 6, 2026
27bb241
Potential fix for pull request finding 'CodeQL / Checkout of untruste…
hilram7 Apr 6, 2026
3e861f3
fix(dale): auto-fix documentation issues (AI-assisted)
github-actions[bot] Apr 6, 2026
3494007
docs: convert blockquote warnings to :::warning admonitions
github-actions[bot] Apr 6, 2026
648fc06
fix(dale): auto-fix documentation issues (AI-assisted)
github-actions[bot] Apr 6, 2026
d3cc2b7
Merge branch 'dev' into feature/md-extension-autofix
hilram7 Apr 6, 2026
50af468
fix(workflow): checkout base branch to prevent untrusted code execution
hilram7 Apr 6, 2026
c9ca57e
fix(dale): auto-fix documentation issues (AI-assisted)
github-actions[bot] Apr 6, 2026
71154cc
Merge branch 'dev' into feature/md-extension-autofix
hilram7 Apr 7, 2026
e13dc9e
fix(dale): auto-fix documentation issues (AI-assisted)
github-actions[bot] Apr 7, 2026
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
156 changes: 156 additions & 0 deletions .github/workflows/md-extension-autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
name: MD Extension Auto-Fix

on:
pull_request:
types: [opened, synchronize]
branches:
- dev

concurrency:
group: md-extension-autofix-${{ github.event.pull_request.number }}

jobs:
md-extension-autofix:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check if triggered by bot commit
id: bot-check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
COMMIT=$(gh api repos/${{ github.repository }}/commits/${{ github.event.pull_request.head.sha }} \
--jq '{message: .commit.message}')
MESSAGE=$(echo "$COMMIT" | jq -r '.message')
echo "Latest commit message: $MESSAGE"
if echo "$MESSAGE" | grep -qE '^fix\(docs\): add missing \.md extension'; then
echo "Skipping: commit is from md-extension-autofix workflow"
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

- name: Checkout PR branch
if: steps.bot-check.outputs.skip != 'true'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
fetch-depth: 0


- name: Configure git identity
if: steps.bot-check.outputs.skip != 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Get changed files in docs/
id: changed-files
if: steps.bot-check.outputs.skip != 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
CHANGED=$(gh pr diff "$PR_NUMBER" --name-only | grep -E '^docs/' || true)
if [ -z "$CHANGED" ]; then
echo "No docs/ files changed"
echo "count=0" >> "$GITHUB_OUTPUT"
else
echo "$CHANGED" > /tmp/changed-files.txt
echo "count=$(echo "$CHANGED" | wc -l | tr -d ' ')" >> "$GITHUB_OUTPUT"
fi

- name: Run md-extension-autofix
id: autofix
if: steps.changed-files.outputs.count > 0
run: |
chmod +x scripts/md-extension-autofix.sh
SUMMARY=$(./scripts/md-extension-autofix.sh /tmp/changed-files.txt)
echo "$SUMMARY" > /tmp/md-extension-summary.json
RENAMED_COUNT=$(echo "$SUMMARY" | jq '.renamed | length')
SKIPPED_COUNT=$(echo "$SUMMARY" | jq '.skipped | length')
echo "renamed=$RENAMED_COUNT" >> "$GITHUB_OUTPUT"
echo "skipped=$SKIPPED_COUNT" >> "$GITHUB_OUTPUT"
echo "Renamed: $RENAMED_COUNT, Skipped: $SKIPPED_COUNT"

- name: Commit renamed files
id: commit
if: steps.autofix.outputs.renamed > 0
run: |
if git diff --quiet && git diff --staged --quiet; then
echo "committed=false" >> "$GITHUB_OUTPUT"
else
git add -A docs/
git commit -m "fix(docs): add missing .md extension to renamed files"
echo "committed=true" >> "$GITHUB_OUTPUT"
fi

- name: Push fixes
if: steps.commit.outputs.committed == 'true'
continue-on-error: true
env:
VALE_TOKEN: ${{ secrets.VALE_TOKEN }}
run: |
git remote set-url origin "https://x-access-token:${VALE_TOKEN}@github.com/${{ github.repository }}.git"
git push

- name: Post PR comment
if: steps.changed-files.outputs.count > 0
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
REPO=${{ github.repository }}

RENAMED_COUNT=0
SKIPPED_COUNT=0
if [ -f /tmp/md-extension-summary.json ]; then
RENAMED_COUNT=$(jq '.renamed | length' /tmp/md-extension-summary.json)
SKIPPED_COUNT=$(jq '.skipped | length' /tmp/md-extension-summary.json)
fi

# Nothing to report — exit silently
if [ "$RENAMED_COUNT" -eq 0 ] && [ "$SKIPPED_COUNT" -eq 0 ]; then
exit 0
fi

{
if [ "$RENAMED_COUNT" -gt 0 ]; then
echo "**Auto-fix: Missing \`.md\` extensions added**"
echo ""
echo "The following files were missing a \`.md\` extension and would not have appeared on the docs site. They've been renamed automatically:"
echo ""
echo "| Original filename | Renamed to |"
echo "|---|---|"
jq -r '.renamed[] | "| `\(.from)` | `\(.to | split("/") | last)` |"' /tmp/md-extension-summary.json
echo ""
echo "Links to these files in other pages have been updated. Please review the changes in the commit above."
fi

if [ "$SKIPPED_COUNT" -gt 0 ]; then
if [ "$RENAMED_COUNT" -gt 0 ]; then echo ""; fi
echo "**Action needed: Possible missing \`.md\` extension**"
echo ""
echo "The following files were added to a docs directory without a \`.md\` extension, but couldn't be auto-renamed:"
echo ""
echo "| File | Reason |"
echo "|---|---|"
jq -r '.skipped[] | "| `\(.file)` | \(.reason) |"' /tmp/md-extension-summary.json
echo ""
echo "If these are markdown pages, add the \`.md\` extension and push again."
fi
} > /tmp/md-extension-comment.md

# Delete previous comments from this workflow
COMMENT_IDS=$(gh api "repos/${REPO}/issues/${PR_NUMBER}/comments" \
--jq '[.[] | select(
.user.login == "github-actions[bot]" and
(.body | (contains("Auto-fix: Missing `.md` extensions") or contains("Action needed: Possible missing `.md` extension")))
) | .id] | .[]' 2>/dev/null || true)
for ID in $COMMENT_IDS; do
gh api "repos/${REPO}/issues/comments/${ID}" -X DELETE 2>/dev/null || true
done

gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file /tmp/md-extension-comment.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
---
title: "FS_SDD_DELETE Job"
description: "FS_SDD_DELETE Job"
sidebar_position: 45
---

# FS_SDD_DELETE Instant Job
# FS_SDD_DELETE Job

The FS_SDD_DELETE instant job deletes Sensitive Data Discovery (SDD) data from the Tier 1 database for specified criteria, hosts, or combinations thereof. This job is available in the Instant Job Library under the File System library.

![FS_SDD_DELETE Job](/images/accessanalyzer/11.6/admin/jobs/instantjobs/fs-sdd-delete.png)

## Runtime Details

- **Dependencies**: The 0.Collection Job Group must be successfully run before running this job
- **Dependencies**: Run the 0.Collection Job Group successfully before running this job
- **Target Hosts**: None (select Local host)
- **Scheduling**: Can be run as desired, typically on an ad-hoc basis
- **History Retention**: Not supported and must be turned off
- **Scheduling**: Run as needed, typically on an ad-hoc basis
- **History Retention**: Not supported. Turn off history retention before running this job.
- **Multi-console Support**: Not supported
- **Additional Notes**: This job performs permanent data deletion with no undo capability. All analysis tasks are disabled by default to prevent accidental data loss.
- **Additional Notes**: This job performs permanent data deletion with no undo capability. Access Analyzer disables all analysis tasks by default to prevent accidental data loss.

The FS_SDD_DELETE instant job provides a controlled method for removing Sensitive Data Discovery data from your Tier 1 database. Use this job to clean up SDD data for specific criteria, remove data associated with decommissioned hosts, or delete specific host-and-criteria combinations. Because this job permanently deletes data with no recovery option, all analysis tasks are disabled by default as a safety measure.
The FS_SDD_DELETE instant job provides a controlled method for removing Sensitive Data Discovery data from your Tier 1 database. Use this job to delete SDD data for specific criteria, remove data associated with decommissioned hosts, or delete specific host-and-criteria combinations. Because this job permanently deletes data with no recovery option, Access Analyzer disables all analysis tasks by default as a safety measure.

## Analysis Tasks for the FS_SDD_DELETE Job

To see the analysis tasks for this job, navigate to **Jobs > Instant Job Library > File System > FS_SDD_DELETE** and select the **Analysis Tasks** tab.

> **WARNING**: This job permanently deletes data from the database. This action cannot be undone. All analysis tasks are disabled by default to prevent accidental data loss. Carefully review the data to be deleted before enabling and running any analysis task.
:::warning
This job permanently deletes data from the database. You can't undo this action. Access Analyzer disables all analysis tasks by default to prevent accidental data loss. Carefully review the data to be deleted before enabling and running any analysis task.
:::

The following analysis tasks are available for the FS_SDD_DELETE job:

- **Delete Criteria** – Deletes all SDD data for specified criteria from all hosts. Use this task when you want to remove all occurrences of specific criteria across your entire environment.
- **Delete Criteria** – Deletes all SDD data for specified criteria from all hosts. Use this task to remove all occurrences of specific criteria across your entire environment.
- **Delete Host** – Deletes all SDD data related to a specific host. Use this task when decommissioning a host or removing all SDD data associated with a particular system.
- **Remove Host & Criteria** – Deletes all SDD data for a specific host and criteria combination. Use this task for targeted removal of SDD data for a specific criterion on a specific host.
- **Remove Host & Criteria** – Deletes all SDD data for a specific host and criteria combination. Use this task to remove SDD data for a specific criterion on a specific host.

### Configuring the Analysis Tasks

Each analysis task requires manually populating temporary database tables before execution. Follow these steps to configure and run an analysis task:
Each analysis task requires manually populating temporary database tables before execution:

1. Open SQL Server Management Studio and connect to your Tier 1 database.
2. Determine which analysis task you need to run based on the data you want to delete.
3. Populate the required temporary table(s):
3. Populate the required temporary tables:
- For **Delete Criteria**: Populate the `#Criteria` temporary table with the criteria names you want to delete
- For **Delete Host**: Populate the `#hosts` temporary table with the host names you want to delete
- For **Remove Host & Criteria**: Populate both the `#hosts` and `#Criteria` temporary tables with the specific host and criteria combinations
Expand All @@ -43,5 +50,5 @@ Each analysis task requires manually populating temporary database tables before
6. Right-click the appropriate analysis task and select **Enable**.
7. Review the enabled task to verify it will delete the correct data.
8. Run the job by clicking **Run Job** and selecting **Local** as the target host.
9. After the job completes, verify the data has been deleted as expected.
9. After the job completes, verify the job deleted the data as expected.
10. Disable the analysis task to prevent accidental future deletions.
27 changes: 17 additions & 10 deletions docs/accessanalyzer/12.0/admin/jobs/instantjobs/fs_sdd_delete.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
---
title: "FS_SDD_DELETE Job"
description: "FS_SDD_DELETE Job"
sidebar_position: 45
---

# FS_SDD_DELETE Instant Job
# FS_SDD_DELETE Job

The FS_SDD_DELETE instant job deletes Sensitive Data Discovery (SDD) data from the Tier 1 database for specified criteria, hosts, or combinations thereof. This job is available in the Instant Job Library under the File System library.

![FS_SDD_DELETE Job](/images/accessanalyzer/12.0/admin/jobs/instantjobs/fs-sdd-delete.png)

## Runtime Details

- **Dependencies**: The 0.Collection Job Group must be successfully run before running this job
- **Dependencies**: Run the 0.Collection Job Group successfully before running this job
- **Target Hosts**: None (select Local host)
- **Scheduling**: Can be run as desired, typically on an ad-hoc basis
- **History Retention**: Not supported and must be turned off
- **Scheduling**: Run as needed, typically on an ad-hoc basis
- **History Retention**: Not supported. Turn off history retention before running this job.
- **Multi-console Support**: Not supported
- **Additional Notes**: This job performs permanent data deletion with no undo capability. All analysis tasks are disabled by default to prevent accidental data loss.
- **Additional Notes**: This job performs permanent data deletion with no undo capability. Access Analyzer disables all analysis tasks by default to prevent accidental data loss.

The FS_SDD_DELETE instant job provides a controlled method for removing Sensitive Data Discovery data from your Tier 1 database. Use this job to clean up SDD data for specific criteria, remove data associated with decommissioned hosts, or delete specific host-and-criteria combinations. Because this job permanently deletes data with no recovery option, all analysis tasks are disabled by default as a safety measure.
The FS_SDD_DELETE instant job provides a controlled method for removing Sensitive Data Discovery data from your Tier 1 database. Use this job to delete SDD data for specific criteria, remove data associated with decommissioned hosts, or delete specific host-and-criteria combinations. Because this job permanently deletes data with no recovery option, Access Analyzer disables all analysis tasks by default as a safety measure.

## Analysis Tasks for the FS_SDD_DELETE Job

To see the analysis tasks for this job, navigate to **Jobs > Instant Job Library > File System > FS_SDD_DELETE** and select the **Analysis Tasks** tab.

> **WARNING**: This job permanently deletes data from the database. This action can't be undone. All analysis tasks are disabled by default to prevent accidental data loss. Carefully review the data to be deleted before enabling and running any analysis task.
:::warning
This job permanently deletes data from the database. You can't undo this action. Access Analyzer disables all analysis tasks by default to prevent accidental data loss. Carefully review the data to be deleted before enabling and running any analysis task.
:::

The following analysis tasks are available for the FS_SDD_DELETE job:

- **Delete Criteria** – Deletes all SDD data for specified criteria from all hosts. Use this task when you want to remove all occurrences of specific criteria across your entire environment.
- **Delete Criteria** – Deletes all SDD data for specified criteria from all hosts. Use this task to remove all occurrences of specific criteria across your entire environment.
- **Delete Host** – Deletes all SDD data related to a specific host. Use this task when decommissioning a host or removing all SDD data associated with a particular system.
- **Remove Host & Criteria** – Deletes all SDD data for a specific host and criteria combination. Use this task for targeted removal of SDD data for a specific criterion on a specific host.
- **Remove Host & Criteria** – Deletes all SDD data for a specific host and criteria combination. Use this task to remove SDD data for a specific criterion on a specific host.

### Configuring the Analysis Tasks

Expand All @@ -43,5 +50,5 @@ Each analysis task requires manually populating temporary database tables before
6. Right-click the appropriate analysis task and select **Enable**.
7. Review the enabled task to verify it will delete the correct data.
8. Run the job by clicking **Run Job** and selecting **Local** as the target host.
9. After the job completes, verify the data has been deleted as expected.
9. After the job completes, verify the job deleted the data as expected.
10. Disable the analysis task to prevent accidental future deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ SET MatchData = NULL,
### Removing All SDD Matches

Use the `FS_SDD_DELETE` instant job to remove SDD matches entirely:
- **NAA v12.0:** [InstantJobs\FS_SDD_DELETE](https://docs.netwrix.com/docs/accessanalyzer/12_0/admin/jobs/instantjobs/fs_sdd_delete)
- **NAA v11.6:** [InstantJobs\FS_SDD_DELETE](https://docs.netwrix.com/docs/accessanalyzer/11_6/admin/jobs/instantjobs/fs_sdd_delete)
- **Access Analyzer 12.0:** [FS_SDD_DELETE Job](https://docs.netwrix.com/docs/accessanalyzer/12_0/admin/jobs/instantjobs/fs_sdd_delete)
- **Access Analyzer 11.6:** [FS_SDD_DELETE Job](https://docs.netwrix.com/docs/accessanalyzer/11_6/admin/jobs/instantjobs/fs_sdd_delete)

## Related Link
## Related Links
- [Configure the (SEEK) File System Scan Query](https://docs.netwrix.com/docs/accessanalyzer/12_0/solutions/filesystem/collection/seek_system_scans#configure-the-seek-file-system-scan-query)
- [FS_SDD_DELETE Job — Access Analyzer 12.0](https://docs.netwrix.com/docs/accessanalyzer/12_0/admin/jobs/instantjobs/fs_sdd_delete)
- [FS_SDD_DELETE Job — Access Analyzer 11.6](https://docs.netwrix.com/docs/accessanalyzer/11_6/admin/jobs/instantjobs/fs_sdd_delete)
Loading
Loading