Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

Commit

Security alerts and updates name work items in the contracts

Vulnerability, SecurityUpdate and CodeAlert carry item (a work item's number in the workspace) where they carried issue, and the security service is sent work.migrated to rewrite the numbers it kept.

G1T-Session:
ses_01m566357hejh9yeqjbetx23f3
syntaqxcommitted Parenta331862Browse files
5 files+26−170/5 viewed
+9−7
396396 /// A newer security update replaced it, or the package is no longer
397397 /// vulnerable; g1t closed it.
398398 Superseded,
399− /// An earlier update g1t opened an issue for, when the version could
399+ /// An earlier update g1t opened a work item for, when the version could
400400 /// not be raised without changing code. New updates no longer reach it:
401401 /// they fail with why, or their pull request stays open.
402402 NeedsCode,
448448 pub branch: Option<String>,
449449 /// The pull request g1t opened.
450450 pub pull: Option<u32>,
451− /// The issue opened for g1t, when the upgrade needs code changes.
452− pub issue: Option<u32>,
451+ /// The work item opened for g1t, by number in the workspace, when the
452+ /// upgrade needs code changes.
453+ pub item: Option<u32>,
453454 /// Why it failed, when it did.
454455 pub error: Option<String>,
455456 /// RFC 3339.
495496 pub severity: String,
496497 pub fixed_version: Option<String>,
497498 pub status: VulnStatus,
498− /// The issue opened to upgrade the package, when g1t was put on
499− /// it: the upgrade needs code changes, or predates security updates.
500− pub issue: Option<u32>,
499+ /// The work item opened to upgrade the package, by number in the
500+ /// workspace, when g1t was put on it: the upgrade needs code changes,
501+ /// or predates security updates.
502+ pub item: Option<u32>,
501503 /// RFC 3339.
502504 pub found_at: String,
503505 pub fixed_at: Option<String>,
573575 pub actor: Option<String>,
574576 pub reason: Option<DismissReason>,
575577 pub comment: Option<String>,
576− /// The pull request or issue it concerns.
578+ /// The pull request or work item it concerns.
577579 pub number: Option<u32>,
578580 /// RFC 3339.
579581 pub at: String,
+2−2
664664 pub dismissed_reason: Option<DismissReason>,
665665 pub dismissed_comment: Option<String>,
666666 pub dismissed_at: Option<String>,
667− /// The issue g1t was put on to fix it.
668− pub issue: Option<u32>,
667+ /// The work item g1t was put on to fix it, by number in the workspace.
668+ pub item: Option<u32>,
669669 }
670670
671671 /// One upload's run of one tool on one commit.
+3−1
149149 // Usage rows that follow a renamed workspace or repository.
150150 ("SUBSCRIBER_BILLING", &[]),
151151 // Secret and dependency scans, and version update pull requests
152− // (security/src/lib.rs on_event).
152+ // (security/src/lib.rs on_event). `work.migrated` rewrites the work
153+ // items kept by their old issue numbers.
153154 (
154155 "SUBSCRIBER_SECURITY",
155156 &[
162163 "comment.created",
163164 "repo.created",
164165 "repo.visibility_changed",
166+ "work.migrated",
165167 ],
166168 ),
167169 // The site-wide search index (search/src/index.rs).
+2−1
187187 dismissedReason: DismissReason | null;
188188 dismissedComment: string | null;
189189 dismissedAt: string | null;
190− issue: number | null;
190+ /** The work item g1t was put on to fix it, by number in the workspace. */
191+ item: number | null;
191192 };
192193
193194 export const CODE_DISMISS_REASONS: { reason: DismissReason; label: string; about: string }[] = [
+10−6
88
99 /**
1010 * The security service: secrets found in pushes and in history, vulnerable
11− * dependencies, and the upgrade issues g1t opens for them. Members of a
11+ * dependencies, and the updates g1t opens for them. Members of a
1212 * workspace see its findings; nobody else does. Mirrors
1313 * `g1t_contracts::security`.
1414 */
130130 severity: Severity;
131131 fixedVersion: string | null;
132132 status: "open" | "fixed" | "dismissed";
133− /** The issue opened for g1t, when upgrading needs code changes. */
134− issue: number | null;
133+ /**
134+ * The work item opened for g1t, by number in the workspace, when upgrading
135+ * needs code changes.
136+ */
137+ item: number | null;
135138 foundAt: string;
136139 fixedAt: string | null;
137140 state: AlertState;
147150 * Where a security update stands. `requested`: a sandbox is making the
148151 * change. `open`: its pull request is going through the required checks.
149152 * `superseded`: a newer update replaced it, or the package is no longer
150− * vulnerable. `needs_code`: an earlier update g1t opened an issue for; new
153+ * vulnerable. `needs_code`: an earlier update g1t opened a work item for; new
151154 * updates no longer reach it. `failed`: see `error`.
152155 */
153156 export type UpdateState = "requested" | "open" | "merged" | "closed" | "superseded" | "needs_code" | "failed";
160163 /** `g1t/security/<package>-<version>`. */
161164 branch: string | null;
162165 pull: number | null;
163− issue: number | null;
166+ /** The work item opened for g1t, by number in the workspace. */
167+ item: number | null;
164168 error: string | null;
165169 updatedAt: string;
166170 };
191195 actor: string | null;
192196 reason: DismissReason | null;
193197 comment: string | null;
194− /** The pull request or issue it concerns. */
198+ /** The pull request or work item it concerns. */
195199 number: number | null;
196200 at: string;
197201 };

Comments

Sign in to comment.