Language: TypeScript
Label: vulnerable
CWE: CWE-269 \u2014 Improper Privilege Management
The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.

Code:
                                        user: User.email,
                                        expiresOn: moment
                                            .unix(Event.item.eventOn)
                                            .add(Event.item.eventDays, "days")
                                            .add(Event.item.eventHours, "hours")
                                            .unix(),
                                        maxAccounts: Event.item.maxAccounts,
                                        eventId: Event.item.id
                                    })
                                )
                            }
                            disabled={NotificationItem.visible}
                        >
                            Open AWS Console
                        </Button>
                        <AwsLoginModal />
                    </>
                )}
                <Alert
                    type={NotificationItem.type}
                    header={NotificationItem.header}
                    onDismiss={() => dispatch({ type: "notification/dismiss" })}
                    visible={NotificationItem.visible}
                    dismissAriaLabel="Close error"
                    dismissible
                >
                    {NotificationItem.content}
                </Alert>
            </SpaceBetween>
        </Container>