Skip to content

EDM-5466 one time maintenance windows - #896

Draft
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-5466-one-time-maintenance-windows
Draft

celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-5466-one-time-maintenance-windows

Conversation

@celdrake

@celdrake celdrake commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

One-time maintenance windows.

Requires a few changes given the latest UX design updates.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 9 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
I18n-Compliance Warning Summary: The check fails. Three user-visible strings in changed .tsx code contain a literal English word that is not wrapped in t(). Scope: The PR head (a6a8e2b) is a root commit with no merge bas… Wrap the grace label in t() in all three places in FleetUpdatePolicyContent.tsx (lines 109, 161, and 467). Use an interpolated, translatable pattern, for example t('Start grace duration: {{ grace }}', { grace }), and reuse the existin…
Passed Passed checks: 9 [REDACTED]ed

Check name Status Explanation
No-Hardcoded-Secrets Passed The no-hardcoded-secrets check [REDACTED]es. I reviewed the full PR patch (main at 257d3f7 to head a6a8e2b, 22 files, 3,172 added lines). Checks run on added lines: - Private key or certificate PEM headers …
No-Weak-Crypto Passed Summary: No weak cryptography, custom crypto, or non-constant-time secret comparison was found. The check [REDACTED]es. Evidence limitation: The checkout holds one commit (a6a8e2b, "EDM-5466: Allow …
No-Injection-Vectors Passed The no-injection-vectors check finds no matching sink in the repository. The PR is flightctl/flightctl-ui #896 by celdrake, branch EDM-5466-one-time-maintenance-windows into main. Diff limitation: Git…
Container-Privileges Passed The container-privileges check applies to container and Kubernetes manifests. This PR changes no such files. Evidence: - The PR head is commit a6a8e2b ("EDM-5466: Allow configurating one-time update a…
No-Sensitive-Data-In-Logs Passed Summary: The check looks for logging that may expose sensitive data. I compared main (257d3f7) with the PR head (a6a8e2b) under libs/ and apps/. The diff covers 22 files, mostly fleet update-pol…
Resource-Leaks Passed The resource-leaks check is scoped to Go files under proxy/. It is not applicable to this pull request. Evidence: - The PR is #896 (flightctl/flightctl-ui, head EDM-5466-one-time-maintenance-windows, …
Unchecked-Errors Passed The check applies to Go files under proxy/. This PR does not change any of them. Evidence: - The checked-out HEAD is commit a6a8e2b ("EDM-5466: Allow configurating one-time update and download win…
Ai-Attribution Passed The check applies only when AI tools were used. The PR description does not mention AI tools. The branch commit range (origin/main..HEAD) contains one commit, a6a8e2b, "EDM-5466: Allow configurating o…
Generated-Files-Not-Hand-Edited Passed PR #896 (flightctl/flightctl-ui, head EDM-5466-one-time-maintenance-windows, author celdrake) changes one protected generated file, and the change matches generator output rather than a hand edit. - *…
Full details: No-Hardcoded-Secrets

Explanation

The no-hardcoded-secrets check [REDACTED]es. I reviewed the full PR patch (main at 257d3f7 to head a6a8e2b, 22 files, 3,172 added lines). Checks run on added lines: - Private key or certificate PEM headers and SSH public key prefixes: none. - URLs with embedded credentials (scheme://user:REDACTED_URI_PASSWORD@host): none. - Variables named api_key, secret, token, [REDACTED]word, [REDACTED]wd, credential, access_key, or auth assigned a string literal: none. I used a Python [REDACTED] that handles both quote styles. An earlier grep had a bracket-quoting bug, so I reran this check. - Base64-like string literals longer than 32 characters: none. - Known vendor token prefixes (ghp_, github_pat_, AKIA, sk-, xox[bp]-): none. The earlier keyword hits came from React key props and regex DURATION_TOKEN in the time-parsing utilities. Neither is a credential. The primary PR author is celdrake (authorStatus verified). The author does not affect this check.

Full details: No-Weak-Crypto

Explanation

Summary: No weak cryptography, custom crypto, or non-constant-time secret comparison was found. The check [REDACTED]es. Evidence limitation: The checkout holds one commit (a6a8e2b, "EDM-5466: Allow configurating one-time update and download windows"). Its parent is not available, so the exact PR patch could not be isolated. This review therefore scanned the head tree and the maintenance-window files directly. Findings: - Banned primitives: A repository-wide search of .ts, .tsx, .js, .go, and .py files found no MD5, SHA1, DES, RC4, 3DES, Blowfish, or ECB usage. It also found no crypto/md5, crypto/sha1, crypto/des, crypto/rc4, or createCipher imports. The only textual matches are in .coderabbit.yaml, which lists these algorithms as banned rules. - Maintenance-window scope: The one-time window files are libs/types/models/OneTimeWindow.ts, libs/types/models/UpdateSchedule.ts, OneTimeWindowsSection.tsx, fleetSpecUtils.ts, UpdateStepUpdatePolicy.tsx, DeviceUpdateStep.tsx, utils/time.ts, form/validations.ts, and types/deviceSpec.ts. None of these contain hashing, cipher, HMAC, or custom crypto code. Their === and !== comparisons test schedule fields, timezones, dates, and counts, not secrets or tokens. The [REDACTED]word and token matches are form labels and types, not crypto. - Custom crypto: No hand-written cipher, hash, or random-number routine appears in the scope files. - Constant-time comparison: The Go tree has no crypto/subtle, hmac.Equal, or ConstantTimeCompare calls. The Go proxy changes in the head commit compare tokens only against empty strings or HTTP status values, not against stored secrets. Conclusion: The explicit failure conditions (banned algorithms, custom crypto, and non-constant-time secret comparison) are absent from the head tree. A tree-wide scan finds no banned primitive that the PR could introduce. The check [REDACTED]es with the stated evidence limitation.

Full details: No-Injection-Vectors

Explanation

The no-injection-vectors check finds no matching sink in the repository. The PR is flightctl/flightctl-ui #896 by celdrake, branch EDM-5466-one-time-maintenance-windows into main. Diff limitation: Git has no merge base between origin/main and HEAD (a6a8e2b). HEAD is a root commit that contains the full tree. I could not isolate the PR patch. I did not treat the whole tree as introduced by the PR. Instead I checked the sinks named in the check across the whole tree, which covers any change the PR could make. Findings: - dangerouslySetInnerHTML: no matches in *.ts, *.tsx, *.js, or *.jsx files. - eval(), new Function(): no matches. The only exec() calls are RegExp.exec on regex patterns (for example deviceLogCommandHandler.ts and the Helm reference parser). They do not run code. - child_process, os.system, os/exec, exec.Command, syscall.Exec: no matches in JS/TS or Go files. - yaml.load: five call sites use js-yaml (vmApplications.ts, deviceSpecUtils.ts, validations.ts, and two others). The project pins js-yaml 4.3.2. In js-yaml 4, load() uses the default safe schema. It does not construct arbitrary objects or functions. This is the closest equivalent to the Python SafeLoader rule, so these calls do not violate the check. Window-related files named in the PR title (OneTimeWindow.ts, OneTimeWindowsSection.tsx, fleetSpecUtils.ts, time.ts, and related update-policy components) contain no matching sink. Because the tree has no matching sink, the PR cannot introduce one. Severity: none identified. The check [REDACTED]es.

Full details: Container-Privileges

Explanation

The container-privileges check applies to container and Kubernetes manifests. This PR changes no such files. Evidence: - The PR head is commit a6a8e2b ("EDM-5466: Allow configurating one-time update and download windows"). The diff against local main touches 22 files, all TypeScript/React, CSS, test, or i18n files under libs/. - No YAML, JSON manifest, Dockerfile, or Containerfile changed. The only JSON file in the diff is libs/i18n/locales/en/translation.json, which is a locale file. - A search of the added and removed diff lines found no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, runAsUser, securityContext, or capabilities content. - The only privilege-related matches in the repository are in .coderabbit.yaml. That file holds the check's own instructions and an unrelated allowPrivilegeEscalation: false example. It is not part of this PR's diff. Caveat: git merge-base with origin/main returned nothing, so I compared against the local main branch. The file list matches the feature scope in the PR title, so the comparison appears valid. No failure condition in the check applies to the changed code.

Full details: No-Sensitive-Data-In-Logs

Explanation

Summary: The check looks for logging that may expose sensitive data. I compared main (257d3f7) with the PR head (a6a8e2b) under libs/ and apps/. The diff covers 22 files, mostly fleet update-policy and one-time maintenance window UI, time/date utilities, form validation, and i18n strings. Evidence: - A search of added lines for console., logger, log., log(, debug(, printf, warn( and similar calls found no logging statements. - A broader search for console, log, debug, token, [REDACTED]word, secret, apiKey and email matched only cronExp.split(...) and local variables named tokens. Those are cron-parsing identifiers, not credentials. Limitations: Git history for the PR is not split into separate commits. The comparison uses main as the base, and the head commit is a single commit. The full diff contains about 3,172 insertions, so pattern searches may miss logging made through other helpers. No linked-repository evidence was used. Conclusion: The PR adds no logging that exposes [REDACTED]words, tokens, API keys, PII, session IDs, internal hostnames, or customer data.

Full details: Resource-Leaks

Explanation

The resource-leaks check is scoped to Go files under proxy/. It is not applicable to this pull request. Evidence: - The PR is #896 (flightctl/flightctl-ui, head EDM-5466-one-time-maintenance-windows, base main). HEAD a6a8e2b has parent 257d3f7, which is origin/main. - git diff --name-only 257d3f7 HEAD lists 22 changed files. All are TypeScript, TSX, CSS, JSON, or translation files under libs/ui-components, libs/i18n. - git diff --name-only 257d3f7 HEAD -- '*.go' returns 0 files. The PR changes no Go code. - The proxy/ Go files exist in the repository, but this PR does not modify them. Their pre-existing state is not caused by this PR, so it cannot trigger the check. Because no Go file under proxy/ changed, no opened file, HTTP response body, network connection, or goroutine was introduced or modified in scope. No failure condition applies. Residual note: the PR diff was read from the local git history. The Go file check is based on that diff, and it covers the complete PR patch against its base.

Full details: Unchecked-Errors

Explanation

The check applies to Go files under proxy/. This PR does not change any of them. Evidence: - The checked-out HEAD is commit a6a8e2b ("EDM-5466: Allow configurating one-time update and download windows"). It has no parent, and main (257d3f7) is not its ancestor. A merge-base diff therefore fails. - A two-dot tree diff main HEAD lists 22 changed files. All are under libs/ui-components (21) or libs/i18n (1). - git diff --quiet main HEAD -- proxy/ reports that proxy/ is identical between main and HEAD. No .go file differs. The PR changes are UI TypeScript and i18n files. The PR description and the summary also describe UI work. Pre-existing proxy/ Go code is outside this PR's change set. The decision contract does not let unchanged code cause a FAIL. No failure condition is introduced. Caveat: the repository history is unrelated to main. The tree comparison against main is the best available approximation of the PR patch. The provider-reported base is main, so this approximation matches the PR's target.

Full details: Ai-Attribution

Explanation

The check applies only when AI tools were used. The PR description does not mention AI tools. The branch commit range (origin/main..HEAD) contains one commit, a6a8e2b, "EDM-5466: Allow configurating one-time update and download windows". Its message ends with the trailer "Assisted-by: OpenAI Codex". That is an accepted attribution trailer under this check. The commit message has no Co-Authored-By trailer naming an AI tool. A search of the branch diff found no other AI tool mentions. The PR author is celdrake, per the provider record. Commit subjects were listed as unavailable, but the commit message was read directly from the repository. No violation was found.

Full details: Generated-Files-Not-Hand-Edited

Explanation

PR #896 (flightctl/flightctl-ui, head EDM-5466-one-time-maintenance-windows, author celdrake) changes one protected generated file, and the change matches generator output rather than a hand edit. - Models (not changed): git diff --stat main HEAD -- libs/types is empty. No file under libs/types/models/**, libs/types/alpha/models/**, or libs/types/imagebuilder/models/** changed. - libs/i18n/locales/en/translation.json (changed): the file is modified, with 77 added and 11 removed key lines. - All 77 added keys (including _one/_other plural variants) map to literal strings in libs/ or apps/ source. Their presence in source was checked with rg. - All 11 removed keys are no longer referenced anywhere outside the locales folder. This matches the removeUnusedKeys: true setting in libs/i18n/i18next.config.js. - The pattern (new source strings added, obsolete strings dropped) matches what npm run i18n (i18next-cli extract) produces. A person editing by hand would be less likely to remove exactly the unused keys. - Limits of the evidence: a diff cannot show which command produced the file. Key ordering is not strictly sorted on either main or HEAD, so ordering gives no signal either way. The commit has no parent (HEAD is a root commit), so I compared against main (257d3f7). No review comments were supplied. Conclusion: no direct hand edit of a generated model file is present. The translation catalog update is consistent with regeneration via npm run i18n. The PR description does not state that the command was run. Reviewers may want to confirm the regeneration step, but the check's failure condition is not met on the evidence available.

Full details: I18n-Compliance

Explanation

Summary: The check fails. Three user-visible strings in changed .tsx code contain a literal English word that is not wrapped in t(). Scope: The PR head (a6a8e2b) is a root commit with no merge base against main (257d3f7). I compared the two trees with git diff main HEAD. Nine .tsx files changed. I read every added line in them. Failing strings (all in libs/ui-components/src/components/Fleet/FleetDetails/FleetUpdatePolicyContent.tsx): - Line 109, timeWithGrace: template literal `${startsAt} · startGraceDuration: ${grace}`. This renders in the Time row of the recurring and one-time window panels. - Line 161, CronFields: <> · startGraceDuration: {grace}</>. This renders in the Cron row. - Line 467, expired-window list: · startGraceDuration:{' '}. Each string has the literal word startGraceDuration in front of a value. The word works as a label for that value. The check exempts configuration snippets only when they are shown as-is and not as labels. The same component wraps its other field labels in t() (t('Time'), t('Timezone'), t('Cron')). The grace label is the only one left untranslated. The form fields for the same value use t('Start grace duration') (UpdateStepUpdatePolicy.tsx:268, OneTimeWindowsSection.tsx:372). This makes the detail view inconsistent with the form and not localizable. Other checks: - All other added user-facing text in the changed .tsx files is inside t(). This includes the multi-line t( calls and the {t('...')} JSX labels. Several examples are ReviewUpdatePolicy.tsx, OneTimeWindowsSection.tsx, UpdateStepUpdatePolicy.tsx, ScheduleTimeZone.tsx, and CalendarDateField.tsx. - Strings that contain only interpolations, symbols, or separators are not flagged. Examples are ${getCalendarDateDisplay(...)} ${getOneTimeWindowTimeText(...)} and ({timeZoneLabel}). - I found no t() call that uses a variable as its key. - .ts helpers such as time.ts and fleetSpecUtils.ts are outside the .tsx scope, so I did not assess them. Ambiguity: Whether startGraceDuration: is a "configuration snippet shown as-is" is a judgment call. I treated it as a label because it precedes the value. If the team decides the YAML key is a snippet, this finding would not apply.

Resolution

Wrap the grace label in t() in all three places in FleetUpdatePolicyContent.tsx (lines 109, 161, and 467). Use an interpolated, translatable pattern, for example t('Start grace duration: {{ grace }}', { grace }), and reuse the existing t('Start grace duration') key where possible. If the team instead decides that the YAML key is an exempt configuration snippet, record that decision and keep the text as-is.

@celdrake celdrake changed the title Edm 5466 one time maintenance windows EDM-5466 one time maintenance windows Nov 25, 2026
@celdrake
celdrake force-pushed the EDM-5466-one-time-maintenance-windows branch from 3aeff0a to 8d7f066 Compare November 25, 2026 13:44
@celdrake
celdrake force-pushed the EDM-5466-one-time-maintenance-windows branch from 8d7f066 to a6a8e2b Compare November 25, 2026 14:23
@celdrake
celdrake marked this pull request as draft November 25, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant